colour.utilities.full¶
- colour.utilities.full(shape: Union[Integer, Tuple[int, ...]], fill_value: Number, dtype: Optional[Type[DTypeNumber]] = None, order: Literal['C', 'F'] = 'C') NDArray[source]¶
Wrap
np.full()definition to create an array with the active type defined by the:attr:colour.constant.DEFAULT_FLOAT_DTYPE attribute.- Parameters
shape (Union[Integer, Tuple[int, ...]]) – Shape of the new array, e.g.,
(2, 3)or2.fill_value (Number) – Fill value.
dtype (Optional[Type[DTypeNumber]]) –
numpy.dtypeto use for conversion, default to thenumpy.dtypedefined by thecolour.constant.DEFAULT_FLOAT_DTYPEattribute.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.])