From d27b489bbe7da81d4afa4f21dc7225a5b1062c1f Mon Sep 17 00:00:00 2001 From: Dave Rowenhorst Date: Fri, 6 Mar 2026 17:33:15 -0500 Subject: [PATCH 1/5] Fix for numpy 2.4 Signed-off by: David Rowenhorst --- pyebsdindex/pcopt.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyebsdindex/pcopt.py b/pyebsdindex/pcopt.py index c8bb2a8..4400e91 100644 --- a/pyebsdindex/pcopt.py +++ b/pyebsdindex/pcopt.py @@ -93,8 +93,7 @@ def _optfunction(PC_i, indexer=None, banddat=None): #average_fit /= npoints result[q] = average_fit - #print(timer()-tic) - return result + return result.squeeze() def optimize(pats, indexer, PC0=None, batch=False): @@ -480,7 +479,7 @@ def updateswarmbest(self, fun2opt, pool, **kwargs): #tic = timer() for part_i in range(self.n_particles): - temp = self.pos[part_i, :] + temp = self.pos[part_i, :].squeeze() val[part_i] = fun2opt(temp, **kwargs) #print(timer()-tic) From aacb2cb6d586e55670d647a8ec4c35a99c081d4f Mon Sep 17 00:00:00 2001 From: Dave Rowenhorst Date: Fri, 6 Mar 2026 17:51:09 -0500 Subject: [PATCH 2/5] Prep for update. Signed-off by: David Rowenhorst --- .github/workflows/tests.yml | 4 ++-- CHANGELOG.rst | 14 ++++++++++++++ pyebsdindex/__init__.py | 2 +- setup.py | 1 - 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d8d8710..d0a3f3b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,8 +45,8 @@ jobs: python-version: ['3.10', '3.11', '3.12'] include: - os: ubuntu-latest - python-version: 3.9 - DEPENDENCIES: matplotlib==3.3 numba==0.55.1 ray[default]==2.9 + python-version: 3.10 + DEPENDENCIES: matplotlib==3.3 numba==0.55.1 LABEL: -oldest steps: - uses: actions/checkout@v6 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 27ed305..f178f62 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,20 @@ All notable changes to PyEBSDIndex will be documented in this file. The format i on `Keep a Changelog `_. +0.3.9.2 (2026-03-06) +================== + Added +----- + +Changed +------- +- Python 3.10 is new minimum required python version. + +Fixed +----- +- Fixed PSO optimization for numpy 2.4 error. + + 0.3.9 (2026-01-26) ================== diff --git a/pyebsdindex/__init__.py b/pyebsdindex/__init__.py index 52a7f0f..d709aa8 100644 --- a/pyebsdindex/__init__.py +++ b/pyebsdindex/__init__.py @@ -7,7 +7,7 @@ ] __description__ = "Python based tool for Radon based EBSD indexing" __name__ = "pyebsdindex" -__version__ = "0.3.9.1" +__version__ = "0.3.9.2" # Try to import only once - also will perform check that at least one GPU is found. diff --git a/setup.py b/setup.py index 3a551e0..3f4ec8c 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,6 @@ long_description_content_type="text/markdown", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", From fa3a53e33b3e932da4b919e17c79cebb61a8d1d2 Mon Sep 17 00:00:00 2001 From: Dave Rowenhorst Date: Fri, 6 Mar 2026 18:11:37 -0500 Subject: [PATCH 3/5] Ray issues? Signed-off by: David Rowenhorst --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3f4ec8c..68892ec 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ "pyopencl", ], "parallel": [ - "ray[default] >= 2.9", + "ray[default] <= 2.54", # "pydantic < 2", ] } From 593bc70d586d18161f42fe3830be16eaa3639217 Mon Sep 17 00:00:00 2001 From: Dave Rowenhorst Date: Fri, 6 Mar 2026 18:12:46 -0500 Subject: [PATCH 4/5] Dave issues Signed-off by: David Rowenhorst --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 68892ec..ab6b9cc 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ "pyopencl", ], "parallel": [ - "ray[default] <= 2.54", + "ray[default] < 2.53", # "pydantic < 2", ] } From ac819a0697e31f80de2048e562dac5bd79810e8e Mon Sep 17 00:00:00 2001 From: Dave Rowenhorst Date: Fri, 6 Mar 2026 18:31:00 -0500 Subject: [PATCH 5/5] Get oldest working Signed-off by: David Rowenhorst --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0a3f3b..340b04c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,7 +46,7 @@ jobs: include: - os: ubuntu-latest python-version: 3.10 - DEPENDENCIES: matplotlib==3.3 numba==0.55.1 + DEPENDENCIES: matplotlib==3.8 numba==0.56.4 pyopencl==2023.1.2 LABEL: -oldest steps: - uses: actions/checkout@v6