get_type

get_type(X, raise_error=True)[source]

Get the string identifier associated with different data structures.

Parameters:
Xcollection

See aeon.utils.data_types.COLLECTIONS_DATA_TYPES for details.

Returns:
input_typestring

One of COLLECTIONS_DATA_TYPES.

raise_errorbool, default=True

If True, raise a ValueError if the input is not a valid type. If False, returns None when an error would be raised.

Raises:
ValueError

X np.ndarray but does not have 2 or 3 dimensions. X is a list but not of np.ndarray or pd.DataFrame or contained data has an inconsistent number of channels. X is a pd.DataFrame of non float primitives. X is not a valid type.

Examples

>>> from aeon.utils.validation import get_type
>>> get_type( np.zeros(shape=(10, 3, 20)))
'numpy3D'