From e661b1a57cd2e2ffd16573cb9444b3a4b7ca01e6 Mon Sep 17 00:00:00 2001 From: Rustam Date: Tue, 18 Mar 2025 11:36:00 +0100 Subject: [PATCH] Fix the issue of using '_flinalg' in NFINDR Fixes #14 From scipy 13.0 on, `sp.linalg._flinalg` is not available. Which is fine, because it's not meant to be used directly:) This pull request replaces `sp.linalg._flinalg` determinant function with `sp.linalg.det` to fix error. Might become a slower, I haven't checked the performance. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ctherien/pysptools/issues/14?shareId=XXXX-XXXX-XXXX-XXXX). --- pysptools/eea/nfindr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 pysptools/eea/nfindr.py diff --git a/pysptools/eea/nfindr.py b/pysptools/eea/nfindr.py old mode 100755 new mode 100644 index 2cafdf2..e012cc1 --- a/pysptools/eea/nfindr.py +++ b/pysptools/eea/nfindr.py @@ -103,7 +103,7 @@ def NFINDR(data, q, transform=None, maxit=None, ATGP_init=False): for k in range(q): for i in range(nsamples): TestMatrix[1:q, k] = transform[i] - volume = math.fabs(sp.linalg._flinalg.sdet_c(TestMatrix)[0]) + volume = math.fabs(sp.linalg.det(TestMatrix)[0]) if volume > actualVolume: actualVolume = volume IDX[k] = i