fatf.utils.array.validation.is_base_dtype

fatf.utils.array.validation.is_base_dtype(dtype)[source]

Determines whether a numpy dtype object is one of base types.

Checks whether the dtype is of any type but numpy.void – this usually happens when a numpy array holds objects instead of base type entities.

Parameters
dtypenumpy.dtype

The dtype to be checked.

Returns
is_basicboolean

True if the dtype is of a base type, False otherwise.

Raises
TypeError

The input is not a numpy’s dtype object.

ValueError

The dtype is structured – this function only accepts plane dtypes.