Skip to content

Commit

Permalink
Upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirreke committed Aug 5, 2024
1 parent 3e13736 commit d2716cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions ndarray-linalg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rand = "0.8.3"
thiserror = "1.0.24"

[dependencies.ndarray]
version = "0.15.2"
version = "0.16.0"
features = ["blas", "approx", "std"]
default-features = false

Expand All @@ -48,9 +48,9 @@ default-features = false

[dev-dependencies]
paste = "1.0.5"
criterion = "0.3.4"
criterion = "0.5.1"
# Keep the same version as ndarray's dependency!
approx = { version = "0.4.0", features = ["num-complex"] }
approx = { version = "0.5", features = ["num-complex"] }
rand_pcg = "0.3.1"

[[bench]]
Expand Down
10 changes: 5 additions & 5 deletions ndarray-linalg/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ where
S: Data,
{
let n = a.len();
a.into_shape((n, 1)).unwrap()
a.into_shape_with_order((n, 1)).unwrap()
}

pub fn into_row<S>(a: ArrayBase<S, Ix1>) -> ArrayBase<S, Ix2>
where
S: Data,
{
let n = a.len();
a.into_shape((1, n)).unwrap()
a.into_shape_with_order((1, n)).unwrap()
}

pub fn flatten<S>(a: ArrayBase<S, Ix2>) -> ArrayBase<S, Ix1>
where
S: Data,
{
let n = a.len();
a.into_shape(n).unwrap()
a.into_shape_with_order(n).unwrap()
}

pub fn into_matrix<A, S>(l: MatrixLayout, a: Vec<A>) -> Result<ArrayBase<S, Ix2>>
Expand Down Expand Up @@ -99,9 +99,9 @@ where
// https://github.com/bluss/rust-ndarray/issues/325
let strides: Vec<isize> = a.strides().to_vec();
let new = if a.is_standard_layout() {
ArrayBase::from_shape_vec(a.dim(), a.into_raw_vec()).unwrap()
ArrayBase::from_shape_vec(a.dim(), a.into_raw_vec_and_offset().0).unwrap()
} else {
ArrayBase::from_shape_vec(a.dim().f(), a.into_raw_vec()).unwrap()
ArrayBase::from_shape_vec(a.dim().f(), a.into_raw_vec_and_offset().0).unwrap()
};
assert_eq!(
new.strides(),
Expand Down

0 comments on commit d2716cf

Please sign in to comment.