colour.utilities.zeros

colour.utilities.zeros(shape, dtype=None, order='C')[source]

Simple wrapper around np.zeros() 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) or 2.

  • 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 zeros.

Return type

ndarray

Examples

>>> zeros(3)
array([ 0.,  0.,  0.])