From eef1ebc202cb23e8a6318e1f921cde623ed72b47 Mon Sep 17 00:00:00 2001 From: Jeff Sharpe Date: Fri, 6 Feb 2026 14:10:06 -0700 Subject: [PATCH 1/3] Working on updating the numpy requirement since v1 is no longer supported --- opencsp/common/lib/geometry/Pxy.py | 4 ++-- opencsp/common/lib/geometry/Vxy.py | 2 +- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opencsp/common/lib/geometry/Pxy.py b/opencsp/common/lib/geometry/Pxy.py index 747fbd8d9..f4baadae3 100644 --- a/opencsp/common/lib/geometry/Pxy.py +++ b/opencsp/common/lib/geometry/Pxy.py @@ -29,7 +29,7 @@ def __init__(self, data, dtype=float): def __repr__(self): return "2D Point:\n" + self._data.__repr__() - def distance(self, data_in: "Pxy") -> npt.NDArray[np.float_]: + def distance(self, data_in: "Pxy") -> npt.NDArray[np.float64]: """ Calculates the Euclidean distance between this point and another Pxy point. @@ -59,7 +59,7 @@ def distance(self, data_in: "Pxy") -> npt.NDArray[np.float_]: return (self - data_in).magnitude() - def angle_from(self, origin: "Pxy") -> npt.NDArray[np.float_]: + def angle_from(self, origin: "Pxy") -> npt.NDArray[np.float64]: """ Returns the rotation angle in which this point lies relative to the given origin point. diff --git a/opencsp/common/lib/geometry/Vxy.py b/opencsp/common/lib/geometry/Vxy.py index e855bcaca..e5cebf4b9 100644 --- a/opencsp/common/lib/geometry/Vxy.py +++ b/opencsp/common/lib/geometry/Vxy.py @@ -258,7 +258,7 @@ def magnitude(self) -> npt.NDArray[np.float64]: """ return np.sqrt(np.sum(self._data**2, 0)) - def angle(self) -> npt.NDArray[np.float_]: + def angle(self) -> npt.NDArray[np.float64]: """ Returns the orientation relative to the origin for each vector, in radians in the standard coordinate system (0 on the x-axis to the right, diff --git a/requirements.txt b/requirements.txt index a06662d9c..87c993b25 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ pyexiftool >= 0.5.6 # packages that can't be installed with conda but can be installed with pip on solo #pippkgs ipykernel >= 6.29.3 opencv-contrib-python >= 4.8.1.78, < 4.10.0.84 -numpy < 2.0.0 +numpy >= 2.0.0 # jhs updated, 02/06/2026, support for version 1 of numpy has been stopped. pytest >= 8.1.1 python-pptx >= 0.6.23 rawpy >= 0.19.1 From f1ef5d2f918bc64d0156a721df0fc25f200570e6 Mon Sep 17 00:00:00 2001 From: Jeff Sharpe Date: Fri, 6 Feb 2026 14:33:05 -0700 Subject: [PATCH 2/3] With NumPy upgrade to v2, opencv needed to be upgraded as well, > 4.10.0.84 --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 87c993b25..cb8928689 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,8 @@ pyexiftool >= 0.5.6 # packages that can't be installed with conda but can be installed with pip on solo #pippkgs ipykernel >= 6.29.3 -opencv-contrib-python >= 4.8.1.78, < 4.10.0.84 +opencv-contrib-python > 4.10.0.84 +# opencv-contrib-python >= 4.8.1.78, < 4.10.0.84 numpy >= 2.0.0 # jhs updated, 02/06/2026, support for version 1 of numpy has been stopped. pytest >= 8.1.1 python-pptx >= 0.6.23 From 04cdc26baba4cf19462279b5d8ccb5412fec432b Mon Sep 17 00:00:00 2001 From: Jeff Sharpe Date: Fri, 6 Feb 2026 15:04:23 -0700 Subject: [PATCH 3/3] Updated np.PINF to np.inf and np.NINF to -np.inf, to align with NumPy 2 --- opencsp/common/lib/geometry/LineXY.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencsp/common/lib/geometry/LineXY.py b/opencsp/common/lib/geometry/LineXY.py index 54804cb74..3a3e5e205 100644 --- a/opencsp/common/lib/geometry/LineXY.py +++ b/opencsp/common/lib/geometry/LineXY.py @@ -104,9 +104,9 @@ def slope(self) -> float: else: # use the original two points to determine the positivity of the slope if self._original_two_points[1].y[0] > self._original_two_points[0].y[0]: - return np.PINF + return np.inf else: - return np.NINF + return -np.inf # return the slope return -self.A / self.B