From 55cda8fc4d7a4495ee88edec0b78763cb1f10bed Mon Sep 17 00:00:00 2001 From: Roy Smart <roytsmart@gmail.com> Date: Wed, 19 Mar 2025 20:00:27 -0600 Subject: [PATCH 1/2] Change instances of `np.trapz` to `np.trapezoid`. --- colorsynth/_colorsynth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colorsynth/_colorsynth.py b/colorsynth/_colorsynth.py index ddef1f2..b6cc23e 100644 --- a/colorsynth/_colorsynth.py +++ b/colorsynth/_colorsynth.py @@ -70,7 +70,7 @@ def d65_standard_illuminant( wavl = wavl << u.nm ybar = color_matching_y(wavl) - Y = np.trapz(x=wavl, y=ybar * spd) + Y = np.trapezoid(x=wavl, y=ybar * spd) spd = spd / Y @@ -357,7 +357,7 @@ def XYZcie1931_from_spd( xyz = color_matching_xyz(wavelength, axis=0) integrand = spd * xyz - result = np.trapz( + result = np.trapezoid( x=wavelength, y=integrand, axis=axis, From 3593d836cfd9a41b8fd0b83ab27b72663c8e821c Mon Sep 17 00:00:00 2001 From: Roy Smart <roytsmart@gmail.com> Date: Wed, 19 Mar 2025 20:05:15 -0600 Subject: [PATCH 2/2] enforce numpy version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 520c8b9..b7e88fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ "Programming Language :: Python :: 3", ] dependencies = [ - "numpy", + "numpy>2", "numba", "matplotlib", "astropy",