flatten_nd_indices

sofia_redux.scan.flags.flag_numba_functions.flatten_nd_indices(indices, array_shape)[source]

Converts ND array indices to flat indices.

Parameters:
indicestuple or numpy.ndarray (int)

The ND indices in the form that would be returned by np.nonzero().

array_shapetuple (int) or numpy.ndarray (int)

The shape of the array for which to generate flat indices.

Returns:
array.flat, flat_indicesnumpy.ndarray, numpy.ndarray (int)