From 356f6f155ec69fbae8ab1361ec648d2345e77f3f Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Mon, 30 Sep 2024 17:22:26 -0400 Subject: [PATCH 1/3] Remove numpy pinning --- requirements/run.txt | 2 +- src/diffpy/pdfgui/control/fitdataset.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/run.txt b/requirements/run.txt index 949c77f6..5b4d7ebd 100644 --- a/requirements/run.txt +++ b/requirements/run.txt @@ -1,4 +1,4 @@ -numpy < 2.0.0 +numpy wxpython diffpy.pdffit2 diffpy.structure diff --git a/src/diffpy/pdfgui/control/fitdataset.py b/src/diffpy/pdfgui/control/fitdataset.py index 45a0e8e1..d5f13e8c 100644 --- a/src/diffpy/pdfgui/control/fitdataset.py +++ b/src/diffpy/pdfgui/control/fitdataset.py @@ -785,10 +785,10 @@ def grid_interpolation(x0, y0, x1, youtleft=0.0, youtright=0.0): Return numpy.array of interpolated y1 values. """ - x0 = numpy.array(x0, copy=False, dtype=float) - y0 = numpy.array(y0, copy=False, dtype=float) + x0 = numpy.asarray(x0, dtype=float) + y0 = numpy.asarray(y0, dtype=float) n0 = len(x0) - x1 = numpy.array(x1, copy=False, dtype=float) + x1 = numpy.asarray(x1, dtype=float) n1 = len(x1) y1 = youtright * numpy.ones(n1, dtype=float) if n0: From e3b617c0623071242f50723e059c6adc5679a5a3 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Mon, 30 Sep 2024 17:26:07 -0400 Subject: [PATCH 2/3] Add copy none --- src/diffpy/pdfgui/control/fitdataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diffpy/pdfgui/control/fitdataset.py b/src/diffpy/pdfgui/control/fitdataset.py index d5f13e8c..c6c8e931 100644 --- a/src/diffpy/pdfgui/control/fitdataset.py +++ b/src/diffpy/pdfgui/control/fitdataset.py @@ -785,10 +785,10 @@ def grid_interpolation(x0, y0, x1, youtleft=0.0, youtright=0.0): Return numpy.array of interpolated y1 values. """ - x0 = numpy.asarray(x0, dtype=float) - y0 = numpy.asarray(y0, dtype=float) + x0 = numpy.asarray(x0, copy=None, dtype=float) + y0 = numpy.asarray(y0, copy=None, dtype=float) n0 = len(x0) - x1 = numpy.asarray(x1, dtype=float) + x1 = numpy.asarray(x1, copy=None, dtype=float) n1 = len(x1) y1 = youtright * numpy.ones(n1, dtype=float) if n0: From aceca5f3f98cec95242e9a9311b311f8569a8b4c Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Mon, 30 Sep 2024 17:28:09 -0400 Subject: [PATCH 3/3] Add news --- news/numpy.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/numpy.rst diff --git a/news/numpy.rst b/news/numpy.rst new file mode 100644 index 00000000..8cab0e07 --- /dev/null +++ b/news/numpy.rst @@ -0,0 +1,23 @@ +**Added:** + +* numpy >= 2.0 support + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*