fatf.utils.array.tools.structured_to_unstructured_row

fatf.utils.array.tools.structured_to_unstructured_row(structured_row: numpy.void, **kwargs) → Union[numpy.dtype, numpy.ndarray][source]

Calls either local or numpy’s structured_to_unstructured function.

Converts a structured row into an unstructured one using either local implementation (fatf.utils.array.tools.fatf_structured_to_unstructured_row) or numpy’s own numpy.lib.recfunctions.structured_to_unstructured. Please see the description of fatf.utils.array.tools.structured_to_unstructured function for the detailed description of when a particular implementation is chosen.

Warning

Since this function either calls a local implementation or a builtin numpy function there may be some inconsistencies in its behaviour. One that we are aware of is conversion of arrays that contain 'V' – raw data (void), 'O' – (Python) objects, 'M' – datetime or 'm' – timedelta dtypes. These types are not supported by the local implementation, however some of them are supported by the numpy built-in, e.g. the 'V' type.

Parameters
structured_rownumpy.void

A row of a structured numpy array to be converted into a plane numpy array representation.

**kwargsOptional[numpy.dtype]

Named parameters that are passed to the appropriate structured to unstructured array converter. These parameters are ignored when calling the local implementation (fatf.utils.array.tools.fatf_structured_to_unstructured_row).

Returns
classic_rowUnion[numpy.dtype, numpy.ndarray]

A classic numpy array or numpy dtype (in case the structured row has just one element) representation of the structured_row with the most generic type out of the input row’s dtypes.