colour.utilities.full#
- colour.utilities.full(shape: int | Tuple[int, ...], fill_value: Real, dtype: Type[DTypeReal] | None = None, order: Literal['C', 'F'] = 'C') ndarray[Any, dtype[_ScalarType_co]] [source]#
Wrap
np.full()
definition to create an array with the active type defined by the:attr:colour.constant.DTYPE_FLOAT_DEFAULT attribute.- Parameters:
shape (int | Tuple[int, ...]) – Shape of the new array, e.g.,
(2, 3)
or2
.fill_value (Real) – Fill value.
dtype (Type[DTypeReal] | None) –
numpy.dtype
to use for conversion, default to thenumpy.dtype
defined by thecolour.constant.DTYPE_FLOAT_DEFAULT
attribute.order (Literal['C', 'F']) – Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.
- Returns:
Array of given shape and
numpy.dtype
, filled with given value.- Return type:
Examples
>>> ones(3) array([ 1., 1., 1.])