colour.utilities.full¶
- colour.utilities.full(shape, fill_value, dtype=None, order='C')[source]¶
Simple wrapper around
np.full()
definition to create arrays with the active type defined by the:attr:colour.constant.DEFAULT_FLOAT_DTYPE attribute.- Parameters
shape (int or array_like) – Shape of the new array, e.g.,
(2, 3)
or2
.fill_value (numeric) – Fill value.
dtype (object) – Type to use for conversion, default to the type defined by the
colour.constant.DEFAULT_FLOAT_DTYPE
attribute.order (unicode, optional) – {‘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 type, filled with given value.
- Return type
ndarray
Examples
>>> ones(3) array([ 1., 1., 1.])