Skip to content

Commit 06af362

Browse files
committed
Support ndarray 0.15
Adding `std` feature is required since ndarray 0.15 made `impl std::error::Error for ShapeError` require std. Bump MSRV to 1.49 in linux-container CI to match the one of ndarray (1.43 was giving errors in ndarray).
1 parent 28c7860 commit 06af362

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/intel-mkl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
3535
linux-container:
3636
runs-on: ubuntu-18.04
37-
container: rustmath/mkl-rust:1.43.0
37+
container: rustmath/mkl-rust:1.49.0
3838
steps:
3939
- uses: actions/checkout@v1
4040
- uses: actions-rs/cargo@v1

ndarray-linalg/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ rand = "0.7.3"
3636
thiserror = "1.0.20"
3737

3838
[dependencies.ndarray]
39-
version = "0.14"
40-
features = ["blas", "approx"]
39+
version = ">=0.14,<0.16"
40+
features = ["blas", "approx", "std"]
4141
default-features = false
4242

4343
[dependencies.lax]

ndarray-linalg/src/cholesky.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//!
2727
//! // Obtain `L`
2828
//! let lower = a.cholesky(UPLO::Lower).unwrap();
29-
//! assert!(lower.all_close(&array![
29+
//! assert!(lower.abs_diff_eq(&array![
3030
//! [ 2., 0., 0.],
3131
//! [ 6., 1., 0.],
3232
//! [-8., 5., 3.]
@@ -39,7 +39,7 @@
3939
//! // Solve `A * x = b`
4040
//! let b = array![4., 13., -11.];
4141
//! let x = a.solvec(&b).unwrap();
42-
//! assert!(x.all_close(&array![-2., 1., 0.], 1e-9));
42+
//! assert!(x.abs_diff_eq(&array![-2., 1., 0.], 1e-9));
4343
//! # }
4444
//! ```
4545

ndarray-linalg/src/solve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! let a: Array2<f64> = array![[3., 2., -1.], [2., -2., 4.], [-2., 1., -2.]];
1717
//! let b: Array1<f64> = array![1., -2., 0.];
1818
//! let x = a.solve_into(b).unwrap();
19-
//! assert!(x.all_close(&array![1., -2., -2.], 1e-9));
19+
//! assert!(x.abs_diff_eq(&array![1., -2., -2.], 1e-9));
2020
//!
2121
//! # }
2222
//! ```

ndarray-linalg/src/solveh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! ];
2424
//! let b: Array1<f64> = array![11., -12., 1.];
2525
//! let x = a.solveh_into(b).unwrap();
26-
//! assert!(x.all_close(&array![1., 3., -2.], 1e-9));
26+
//! assert!(x.abs_diff_eq(&array![1., 3., -2.], 1e-9));
2727
//!
2828
//! # }
2929
//! ```

0 commit comments

Comments
 (0)