colour.colorimetry.reshape_sd#

colour.colorimetry.reshape_sd(sd: TypeSpectralDistribution, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, method: Literal['Align', 'Extrapolate', 'Interpolate', 'Trim'] | str = 'Align', copy: bool = True, **kwargs: Any) TypeSpectralDistribution[source]#

Reshape given spectral distribution 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:
Return type:

colour.SpectralDistribution

Warning

Contrary to Numpy, reshaping a spectral distribution alters its data!