Do not directly depend on ndarray, but through numpy

Fri, 08 May 2026 17:16:34 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Fri, 08 May 2026 17:16:34 -0500
changeset 4
49b062acace9
parent 3
c3a4f4bb87f7
child 5
3e164c024a01

Do not directly depend on ndarray, but through numpy

Cargo.toml file | annotate | diff | comparison | revisions
src/python_access/diff_mapping.rs file | annotate | diff | comparison | revisions
src/python_access/numpy_array.rs file | annotate | diff | comparison | revisions
--- a/Cargo.toml	Wed Apr 22 22:32:00 2026 -0500
+++ b/Cargo.toml	Fri May 08 17:16:34 2026 -0500
@@ -39,7 +39,6 @@
 serde_json = "1.0.140"
 nalgebra = "0.34"
 numpy = { version = "0.27.0", features = ["nalgebra"] }
-ndarray = "0.16.1"
 log = { version = "0.4.28", features = [
     "max_level_debug",
     "release_max_level_warn",
--- a/src/python_access/diff_mapping.rs	Wed Apr 22 22:32:00 2026 -0500
+++ b/src/python_access/diff_mapping.rs	Fri May 08 17:16:34 2026 -0500
@@ -8,7 +8,7 @@
 use alg_tools::linops::IdOp;
 use alg_tools::mapping::{ClosedSpace, DifferentiableImpl, Instance, Mapping, Space};
 use anyhow::anyhow;
-use ndarray::Dimension;
+use numpy::ndarray::Dimension;
 use numpy::{Ix1, Ix2};
 use pointsource_algs::forward_model::{BoundedCurvature, BoundedCurvatureGuess};
 use pointsource_algs::prox_penalty::{RadonSquared, StepLengthBound, StepLengthBoundPair};
--- a/src/python_access/numpy_array.rs	Wed Apr 22 22:32:00 2026 -0500
+++ b/src/python_access/numpy_array.rs	Fri May 08 17:16:34 2026 -0500
@@ -5,7 +5,7 @@
 use alg_tools::euclidean::wrap::{WrapGuard, WrapGuardMut, Wrapped};
 use alg_tools::types::Float;
 use nalgebra::{DMatrix, DMatrixView, DMatrixViewMut, Dyn};
-use ndarray::{Dimension, Ix1, Ix2};
+use numpy::ndarray::{Dimension, Ix1, Ix2};
 use numpy::{PyArray, PyArrayMethods, PyReadonlyArray, PyReadwriteArray, ToPyArray};
 use pyo3::prelude::*;
 

mercurial