dict2array

dict2array(features_dict)[source]

Stack a dictionary of arrays into a single array along the last axis.

The arrays are stacked in alphabetical order of their dictionary keys.

Parameters:

features_dict (dict[str, ndarray] | None) – Mapping from a feature name to a numpy array, or None.

Returns:

A stacked array with an added last dimension for features, or None.

Return type:

ndarray | None