colour.utilities.MixinDataclassArray¶
- class colour.utilities.MixinDataclassArray[source]¶
Bases:
colour.utilities.array.MixinDataclassIterableA mixin providing conversion methods for
dataclass-like class conversion tonumpy.ndarrayclass.Methods
Notes
The
colour.utilities.MixinDataclassArrayclass inherits the methods from the following classes:
- __array__(dtype: Optional[Type[DTypeNumber]] = None) NDArray[source]¶
Implement support for
dataclass-like class conversion tonumpy.ndarrayclass.A field set to None will be filled with np.nan according to the shape of the first field not set with None.
- Parameters
dtype (Optional[Type[DTypeNumber]]) –
numpy.dtypeto use for conversion to np.ndarray, default to thenumpy.dtypedefined bycolour.constant.DEFAULT_FLOAT_DTYPEattribute.- Returns
dataclass-like class converted tonumpy.ndarray.- Return type