colour.utilities.MixinDataclassArray#
- class colour.utilities.MixinDataclassArray[source]#
Bases:
colour.utilities.array.MixinDataclassIterable
A mixin providing conversion methods for
dataclass
-like class conversion tonumpy.ndarray
class.Methods
Notes
The
colour.utilities.MixinDataclassArray
class inherits the methods from the following classes:
- __array__(dtype: Type[DTypeReal] | None = None) NDArray [source]#
Implement support for
dataclass
-like class conversion tonumpy.ndarray
class.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 (Type[DTypeReal] | None) –
numpy.dtype
to use for conversion to np.ndarray, default to thenumpy.dtype
defined bycolour.constant.DEFAULT_FLOAT_DTYPE
attribute.- Returns
dataclass
-like class converted tonumpy.ndarray
.- Return type