Skip to content

Commit cf1d7f1

Browse files
DirrekeChristian Günther
authored and
Christian Günther
committed
Upgrade deps
1 parent 6fb7207 commit cf1d7f1

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

ndarray-linalg/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rand = "0.8.3"
3737
thiserror = "1.0.24"
3838

3939
[dependencies.ndarray]
40-
version = "0.15.2"
40+
version = "0.16.0"
4141
features = ["blas", "approx", "std"]
4242
default-features = false
4343

@@ -48,9 +48,9 @@ default-features = false
4848

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

5656
[[bench]]

ndarray-linalg/src/convert.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ where
1212
S: Data,
1313
{
1414
let n = a.len();
15-
a.into_shape((n, 1)).unwrap()
15+
a.into_shape_with_order((n, 1)).unwrap()
1616
}
1717

1818
pub fn into_row<S>(a: ArrayBase<S, Ix1>) -> ArrayBase<S, Ix2>
1919
where
2020
S: Data,
2121
{
2222
let n = a.len();
23-
a.into_shape((1, n)).unwrap()
23+
a.into_shape_with_order((1, n)).unwrap()
2424
}
2525

2626
pub fn flatten<S>(a: ArrayBase<S, Ix2>) -> ArrayBase<S, Ix1>
2727
where
2828
S: Data,
2929
{
3030
let n = a.len();
31-
a.into_shape(n).unwrap()
31+
a.into_shape_with_order(n).unwrap()
3232
}
3333

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

ndarray-linalg/tests/det.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn det_zero_nonsquare() {
9494
assert!(a.sln_det_into().is_err());
9595
};
9696
}
97-
for &shape in &[(1, 2).into_shape(), (1, 2).f()] {
97+
for &shape in &[(1, 2).into_shape_with_order(), (1, 2).f()] {
9898
det_zero_nonsquare!(f64, shape);
9999
det_zero_nonsquare!(f32, shape);
100100
det_zero_nonsquare!(c64, shape);
@@ -186,7 +186,7 @@ fn det_nonsquare() {
186186
};
187187
}
188188
for &dims in &[(1, 0), (1, 2), (2, 1), (2, 3)] {
189-
for &shape in &[dims.into_shape(), dims.f()] {
189+
for &shape in &[dims.into_shape_with_order(), dims.f()] {
190190
det_nonsquare!(f64, shape);
191191
det_nonsquare!(f32, shape);
192192
det_nonsquare!(c64, shape);

ndarray-linalg/tests/deth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn deth_zero_nonsquare() {
6060
assert!(a.sln_deth_into().is_err());
6161
};
6262
}
63-
for &shape in &[(1, 2).into_shape(), (1, 2).f()] {
63+
for &shape in &[(1, 2).into_shape_with_order(), (1, 2).f()] {
6464
deth_zero_nonsquare!(f64, shape);
6565
deth_zero_nonsquare!(f32, shape);
6666
deth_zero_nonsquare!(c64, shape);
@@ -138,7 +138,7 @@ fn deth_nonsquare() {
138138
};
139139
}
140140
for &dims in &[(1, 0), (1, 2), (2, 1), (2, 3)] {
141-
for &shape in &[dims.into_shape(), dims.f()] {
141+
for &shape in &[dims.into_shape_with_order(), dims.f()] {
142142
deth_nonsquare!(f64, shape);
143143
deth_nonsquare!(f32, shape);
144144
deth_nonsquare!(c64, shape);

ndarray-linalg/tests/inv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn inv_into_random_complex() {
106106
#[should_panic]
107107
fn inv_error() {
108108
// do not have inverse
109-
let a = Array::<f64, _>::zeros(9).into_shape((3, 3)).unwrap();
109+
let a = Array::<f64, _>::zeros(9).into_shape_with_order((3, 3)).unwrap();
110110
let a_inv = a.inv().unwrap();
111111
println!("{:?}", a_inv);
112112
}

ndarray-linalg/tests/opnorm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ fn gen(i: usize, j: usize, rev: bool) -> Array2<f64> {
1414
let n = (i * j + 1) as f64;
1515
if rev {
1616
Array::range(1., n, 1.)
17-
.into_shape((j, i))
17+
.into_shape_with_order((j, i))
1818
.unwrap()
1919
.reversed_axes()
2020
} else {
21-
Array::range(1., n, 1.).into_shape((i, j)).unwrap()
21+
Array::range(1., n, 1.).into_shape_with_order((i, j)).unwrap()
2222
}
2323
}
2424

0 commit comments

Comments
 (0)