def non_zero_func(x):
    """Function which returns non-zero indices of an array

    Args:
        x (1d numpy array): input array

    Returns:
        1d numpy array: output non-zero indicies
    """

    inds = x.nonzero()[0]

    return inds