Skip to content

Commit

Permalink
Merge pull request #355 from pmarks/pmarks/widen-ndarray
Browse files Browse the repository at this point in the history
chore: widen ndarray version
  • Loading branch information
mulimoen authored Sep 12, 2024
2 parents 67a6456 + 1ba9ea9 commit be783a9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sprs-ldl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ sprs_suitesparse_ldl = { version = "0.8.0", path = "../suitesparse_bindings/sprs
sprs_suitesparse_camd = { version = "0.3.0", path = "../suitesparse_bindings/sprs_suitesparse_camd", optional = true }

[dev-dependencies]
ndarray = ">=0.11.0,<0.16"
ndarray = ">=0.15.0,<=0.16"
2 changes: 1 addition & 1 deletion sprs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ multi_thread = ["dep:rayon", "dep:num_cpus"]

[dependencies]
num-traits = "0.2.0"
ndarray = "0.15"
ndarray = ">=0.15,<=0.16"
alga = { version = "0.9.0", optional = true }
num-complex = "0.4.0"
serde = { version = "1.0.0", optional = true, features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions sprs/benches/sparse_dense_products.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn sparse_dense_vec_matprod_specialized(bench: &mut Bencher) {
);
let rows = a.rows();
let cols = w.shape()[0];
#[allow(deprecated)]
let w_reshape = w.view().into_shape((1, cols)).unwrap();
let w_t = w_reshape.t();
let mut res = Array2::<f64>::zeros((rows, 1).f());
Expand Down
1 change: 1 addition & 0 deletions sprs/examples/heat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ fn main() {
"Solved system in {} iterations with residual error {}",
iters, error
);
#[allow(deprecated)]
let grid = x.view().into_shape((rows, cols)).unwrap();
for i in 0..rows {
for j in 0..cols {
Expand Down
2 changes: 2 additions & 0 deletions sprs/src/sparse/csmat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2123,9 +2123,11 @@ where
fn mul(self, rhs: &'b ArrayBase<DS2, Ix1>) -> Array<N, Ix1> {
let rows = self.rows();
let cols = rhs.shape()[0];
#[allow(deprecated)]
let rhs_reshape = rhs.view().into_shape((cols, 1)).unwrap();
let mut res = Array::zeros(rows);
{
#[allow(deprecated)]
let res_reshape = res.view_mut().into_shape((rows, 1)).unwrap();
match self.storage() {
CSR => {
Expand Down

0 comments on commit be783a9

Please sign in to comment.