Skip to content

Commit

Permalink
fix edge case where SpectralDistribution is subclassed
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdcs committed Mar 14, 2023
1 parent 969b019 commit 6d4e98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion colour/colorimetry/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ def __init__(
kwargs["interpolator"] = kwargs.get(
"interpolator",
SpragueInterpolator
if is_uniform(domain_unpacked)
if domain_unpacked.size != 0 and is_uniform(domain_unpacked)
else CubicSplineInterpolator,
)
kwargs["interpolator_kwargs"] = kwargs.get("interpolator_kwargs", {})
Expand Down

0 comments on commit 6d4e98a

Please sign in to comment.