colour.colorimetry.reshape_msds#
- colour.colorimetry.reshape_msds(msds: TypeMultiSpectralDistributions, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, method: Literal['Align', 'Extrapolate', 'Interpolate', 'Trim'] | str = 'Align', copy: bool = True, **kwargs: Any) TypeMultiSpectralDistributions [source]#
Reshape given multi-spectral distributions with given spectral shape.
The reshaped object is cached, thus another call to the definition with the same arguments will yield the cached object immediately.
- Parameters:
msds (TypeMultiSpectralDistributions) – Spectral distribution to reshape.
shape (SpectralShape) – Spectral shape to reshape the multi-spectral distributions with.
method (Literal['Align', 'Extrapolate', 'Interpolate', 'Trim'] | str) – Reshape method.
copy (bool) – Whether to return a copy of the cached multi-spectral distributions. Default is True.
kwargs (Any) – {
colour.MultiSpectralDistributions.align()
,colour.MultiSpectralDistributions.extrapolate()
,colour.MultiSpectralDistributions.interpolate()
,colour.MultiSpectralDistributions.trim()
}, See the documentation of the previously listed methods.
- Return type:
Warning
Contrary to Numpy, reshaping a multi-spectral distributions alters its data!