From bb35ab9c8400a809c0e9c51895adae3a1536b726 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Wed, 13 Mar 2024 18:11:50 +1300 Subject: [PATCH] Ensure that `sd` is converted to `ndarray` before converting to bytes in `colour.sd_to_XYZ` definition. --- colour/colorimetry/tristimulus_values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colour/colorimetry/tristimulus_values.py b/colour/colorimetry/tristimulus_values.py index 321869080..983e817d3 100644 --- a/colour/colorimetry/tristimulus_values.py +++ b/colour/colorimetry/tristimulus_values.py @@ -1249,7 +1249,7 @@ def sd_to_XYZ( ( sd if isinstance(sd, (SpectralDistribution, MultiSpectralDistributions)) - else int_digest(sd.tobytes()) # pyright: ignore + else int_digest(np.asarray(sd).tobytes()) # pyright: ignore ), # pyright: ignore cmfs, illuminant,