colour.colorimetry.reshape_msds¶
- colour.colorimetry.reshape_msds(msds: colour.colorimetry.spectrum.MultiSpectralDistributions, shape: colour.colorimetry.spectrum.SpectralShape = SPECTRAL_SHAPE_DEFAULT, method: Union[Literal['Align', 'Extrapolate', 'Interpolate', 'Trim'], str] = 'Align', **kwargs: Any) colour.colorimetry.spectrum.MultiSpectralDistributions[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 (colour.colorimetry.spectrum.MultiSpectralDistributions) – Spectral distribution to reshape.
shape (colour.colorimetry.spectrum.SpectralShape) – Spectral shape to reshape the multi-spectral distributions with.
method (Union[Literal['Align', 'Extrapolate', 'Interpolate', 'Trim'], str]) – Reshape method.
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!