def METHOD_NAME(x: np.ndarray) -> bool:
    """
    Checks if array is really an index permutation.
    Args:
        1D-array of integers that supposedly represents a permutation.
    Returns:
        True, if array is really a permutation of indices.
    """
    return (
        isinstance(x, np.ndarray)
        and x.ndim == 1
        and x.dtype == np.int64
        and np.all(np.sort(x) == np.arange(x.size, dtype=np.int64))
    )