diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index e7e06f2f..2144049f 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -34,7 +34,7 @@ jobs: linux-container: runs-on: ubuntu-18.04 - container: rustmath/mkl-rust:1.43.0 + container: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.49.0 steps: - uses: actions/checkout@v1 - uses: actions-rs/cargo@v1 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b1c2bc1f..f4aa30ae 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,7 +27,7 @@ jobs: coverage: runs-on: ubuntu-18.04 container: - image: rustmath/mkl-rust:1.43.0 + image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.49.0 options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@v2 diff --git a/lax/Cargo.toml b/lax/Cargo.toml index fccf952a..a8e74044 100644 --- a/lax/Cargo.toml +++ b/lax/Cargo.toml @@ -29,10 +29,10 @@ intel-mkl-static = ["intel-mkl-src/mkl-static-lp64-seq", "intel-mkl-src/download intel-mkl-system = ["intel-mkl-src/mkl-dynamic-lp64-seq"] [dependencies] -thiserror = "1.0.23" -cauchy = "0.3.0" +thiserror = "1.0.24" +cauchy = "0.4.0" num-traits = "0.2.14" -lapack = "0.17.0" +lapack = "0.18.0" [dependencies.intel-mkl-src] version = "0.6.0" @@ -46,7 +46,7 @@ features = ["cblas"] default-features = false [dependencies.openblas-src] -version = "0.10.2" +version = "0.10.4" optional = true default-features = false features = ["cblas"] diff --git a/ndarray-linalg/Cargo.toml b/ndarray-linalg/Cargo.toml index 559cec06..1c3ab554 100644 --- a/ndarray-linalg/Cargo.toml +++ b/ndarray-linalg/Cargo.toml @@ -29,15 +29,15 @@ intel-mkl-static = ["lax/intel-mkl-static"] intel-mkl-system = ["lax/intel-mkl-system"] [dependencies] -cauchy = "0.3.0" -num-complex = "0.3.1" -num-traits = "0.2.11" -rand = "0.7.3" -thiserror = "1.0.20" +cauchy = "0.4.0" +num-complex = "0.4.0" +num-traits = "0.2.14" +rand = "0.8.3" +thiserror = "1.0.24" [dependencies.ndarray] -version = "0.14" -features = ["blas", "approx"] +version = "0.15.1" +features = ["blas", "approx", "std"] default-features = false [dependencies.lax] @@ -46,10 +46,10 @@ path = "../lax" default-features = false [dev-dependencies] -paste = "1.0" -criterion = "0.3" +paste = "1.0.5" +criterion = "0.3.4" # Keep the same version as ndarray's dependency! -approx = { version = "0.4", features = ["num-complex"] } +approx = { version = "0.4.0", features = ["num-complex"] } [[bench]] name = "truncated_eig" diff --git a/ndarray-linalg/src/cholesky.rs b/ndarray-linalg/src/cholesky.rs index 8ce0da84..58cc5cee 100644 --- a/ndarray-linalg/src/cholesky.rs +++ b/ndarray-linalg/src/cholesky.rs @@ -26,7 +26,7 @@ //! //! // Obtain `L` //! let lower = a.cholesky(UPLO::Lower).unwrap(); -//! assert!(lower.all_close(&array![ +//! assert!(lower.abs_diff_eq(&array![ //! [ 2., 0., 0.], //! [ 6., 1., 0.], //! [-8., 5., 3.] @@ -39,7 +39,7 @@ //! // Solve `A * x = b` //! let b = array![4., 13., -11.]; //! let x = a.solvec(&b).unwrap(); -//! assert!(x.all_close(&array![-2., 1., 0.], 1e-9)); +//! assert!(x.abs_diff_eq(&array![-2., 1., 0.], 1e-9)); //! # } //! ``` diff --git a/ndarray-linalg/src/eigh.rs b/ndarray-linalg/src/eigh.rs index 86f1fb46..580c2b7e 100644 --- a/ndarray-linalg/src/eigh.rs +++ b/ndarray-linalg/src/eigh.rs @@ -8,7 +8,6 @@ use crate::layout::*; use crate::operator::LinearOperator; use crate::types::*; use crate::UPLO; -use std::iter::FromIterator; /// Eigenvalue decomposition of Hermite matrix reference pub trait Eigh { diff --git a/ndarray-linalg/src/lobpcg/eig.rs b/ndarray-linalg/src/lobpcg/eig.rs index 0b5a60e8..e60adb04 100644 --- a/ndarray-linalg/src/lobpcg/eig.rs +++ b/ndarray-linalg/src/lobpcg/eig.rs @@ -139,9 +139,9 @@ impl Iterator // add the new eigenvector to the internal constrain matrix let new_constraints = if let Some(ref constraints) = self.eig.constraints { let eigvecs_arr: Vec<_> = constraints - .gencolumns() + .columns() .into_iter() - .chain(vecs.gencolumns().into_iter()) + .chain(vecs.columns().into_iter()) .collect(); stack(Axis(1), &eigvecs_arr).unwrap() diff --git a/ndarray-linalg/src/lobpcg/lobpcg.rs b/ndarray-linalg/src/lobpcg/lobpcg.rs index a10e5961..1bc4f2ad 100644 --- a/ndarray-linalg/src/lobpcg/lobpcg.rs +++ b/ndarray-linalg/src/lobpcg/lobpcg.rs @@ -81,7 +81,7 @@ fn apply_constraints( let gram_yv = y.t().dot(&v); let u = gram_yv - .gencolumns() + .columns() .into_iter() .map(|x| { let res = cholesky_yy.solvec(&x).unwrap(); @@ -222,7 +222,7 @@ pub fn lobpcg< // calculate L2 norm of error for every eigenvalue let residual_norms = r - .gencolumns() + .columns() .into_iter() .map(|x| x.norm()) .collect::>(); diff --git a/ndarray-linalg/src/lobpcg/svd.rs b/ndarray-linalg/src/lobpcg/svd.rs index a796364d..7a326293 100644 --- a/ndarray-linalg/src/lobpcg/svd.rs +++ b/ndarray-linalg/src/lobpcg/svd.rs @@ -64,7 +64,7 @@ impl + 'static + MagnitudeCorrection> Trunc let mut ularge = self.problem.dot(&vlarge); ularge - .gencolumns_mut() + .columns_mut() .into_iter() .zip(values.iter()) .for_each(|(mut a, b)| a.mapv_inplace(|x| x / *b)); @@ -75,7 +75,7 @@ impl + 'static + MagnitudeCorrection> Trunc let mut vlarge = self.problem.t().dot(&ularge); vlarge - .gencolumns_mut() + .columns_mut() .into_iter() .zip(values.iter()) .for_each(|(mut a, b)| a.mapv_inplace(|x| x / *b)); diff --git a/ndarray-linalg/src/solve.rs b/ndarray-linalg/src/solve.rs index dc71bf66..7e695a8c 100644 --- a/ndarray-linalg/src/solve.rs +++ b/ndarray-linalg/src/solve.rs @@ -16,7 +16,7 @@ //! let a: Array2 = array![[3., 2., -1.], [2., -2., 4.], [-2., 1., -2.]]; //! let b: Array1 = array![1., -2., 0.]; //! let x = a.solve_into(b).unwrap(); -//! assert!(x.all_close(&array![1., -2., -2.], 1e-9)); +//! assert!(x.abs_diff_eq(&array![1., -2., -2.], 1e-9)); //! //! # } //! ``` diff --git a/ndarray-linalg/src/solveh.rs b/ndarray-linalg/src/solveh.rs index fcfc6933..26329509 100644 --- a/ndarray-linalg/src/solveh.rs +++ b/ndarray-linalg/src/solveh.rs @@ -23,7 +23,7 @@ //! ]; //! let b: Array1 = array![11., -12., 1.]; //! let x = a.solveh_into(b).unwrap(); -//! assert!(x.all_close(&array![1., 3., -2.], 1e-9)); +//! assert!(x.abs_diff_eq(&array![1., 3., -2.], 1e-9)); //! //! # } //! ``` diff --git a/ndarray-linalg/tests/cholesky.rs b/ndarray-linalg/tests/cholesky.rs index b45afb5c..a498afc3 100644 --- a/ndarray-linalg/tests/cholesky.rs +++ b/ndarray-linalg/tests/cholesky.rs @@ -140,7 +140,7 @@ macro_rules! cholesky_det { .eigvalsh(UPLO::Upper) .unwrap() .mapv(|elem| elem.ln()) - .scalar_sum(); + .sum(); let det = ln_det.exp(); assert_aclose!(a.factorizec(UPLO::Upper).unwrap().detc(), det, $atol); assert_aclose!(a.factorizec(UPLO::Upper).unwrap().ln_detc(), ln_det, $atol);