fatf.utils.array.validation.is_1d_like

fatf.utils.array.validation.is_1d_like(oned_like_object: Union[numpy.ndarray, numpy.void]) → bool[source]

Checks if the input is either a 1D numpy array or a structured numpy row.

Parameters
oned_like_objectUnion[numpy.ndarray, numpy.void]

The object to be checked.

Returns
is_1d_like_arrayboolean

True if the input is either a 1-dimensional numpy array or a row of a structured numpy array, False otherwise.

Raises
TypeError

The input is neither a numpy ndarray – array-like object – nor a numpy void – a row of a structured numpy array.