Bump sprs to 0.10

This commit is contained in:
2021-03-18 23:27:03 +01:00
parent 550b43b4cd
commit be984fbdac
6 changed files with 14 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ ndarray = { version = "0.14.0", features = ["approx"] }
approx = "0.4.0"
packed_simd = { version = "0.3.3", package = "packed_simd_2" }
rayon = { version = "1.3.0", optional = true }
sprs = { version = "0.9.0", optional = true, default-features = false }
sprs = { version = "0.10.0", optional = true, default-features = false }
serde = { version = "1.0.115", optional = true, default-features = false, features = ["derive"] }
num-traits = "0.2.14"

View File

@@ -111,12 +111,13 @@ impl super::SbpOperator1d2 for SBP4 {
// d_x => -d_x when reversed
d1.iter_mut().for_each(|v| *v *= -1.0);
// Indices are now in reverse order
sprs::CsMat::new(
sprs::CsMat::new_from_unsorted(
(1, n),
vec![0, d1.len()],
(0..n).rev().take(d1.len()).collect(),
d1,
)
.unwrap()
}
}
}