colour.utilities.full#
- colour.utilities.full(shape: int | Sequence[int], fill_value: Real, dtype: Type[DTypeReal] | None = None) NDArray[source]#
Create an array of the specified value with the active dtype.
Wrap
np.full()definition to create an array with the activenumpy.dtypedefined by thecolour.constant.DTYPE_FLOAT_DEFAULTattribute.- Parameters:
shape (int | Sequence[int]) – Shape of the new array, e.g.,
(2, 3)or2.fill_value (Real) – Fill value.
dtype (Type[DTypeReal] | None) –
numpy.dtypeto use for conversion, default to thenumpy.dtypedefined by thecolour.constant.DTYPE_FLOAT_DEFAULTattribute.
- Returns:
Array of the specified shape and
numpy.dtype, filled with the specified value.- Return type:
Examples
>>> full(3, 2.5) array([2.5, 2.5, 2.5])