diff --git a/lax/Cargo.toml b/lax/Cargo.toml index 076d5cf2..e34028fa 100644 --- a/lax/Cargo.toml +++ b/lax/Cargo.toml @@ -30,7 +30,7 @@ intel-mkl-system = ["intel-mkl-src/mkl-dynamic-lp64-seq"] [dependencies] thiserror = "2.0.0" -cauchy = "0.4.0" +cauchy = {git="https://github.com/Dirreke/cauchy.git", branch="bump-rand"} num-traits = "0.2.14" lapack-sys = "0.15.0" katexit = "0.1.2" diff --git a/ndarray-linalg/Cargo.toml b/ndarray-linalg/Cargo.toml index 8c5c83a8..f1d33d61 100644 --- a/ndarray-linalg/Cargo.toml +++ b/ndarray-linalg/Cargo.toml @@ -30,11 +30,11 @@ intel-mkl-static = ["lax/intel-mkl-static"] intel-mkl-system = ["lax/intel-mkl-system"] [dependencies] -cauchy = "0.4.0" +cauchy = {git="https://github.com/Dirreke/cauchy.git", branch="bump-rand"} katexit = "0.1.2" -num-complex = "0.4.0" +num-complex = {git="https://github.com/Dirreke/num-complex.git", branch="bump-rand"} num-traits = "0.2.14" -rand = "0.8.3" +rand = "0.9" thiserror = "2.0.0" [dependencies.ndarray] @@ -52,7 +52,7 @@ paste = "1.0.5" criterion = "0.5.1" # Keep the same version as ndarray's dependency! approx = { version = "0.5", features = ["num-complex"] } -rand_pcg = "0.3.1" +rand_pcg = "0.9" [[bench]] name = "truncated_eig" diff --git a/ndarray-linalg/src/generate.rs b/ndarray-linalg/src/generate.rs index 5646c808..965aa5ff 100644 --- a/ndarray-linalg/src/generate.rs +++ b/ndarray-linalg/src/generate.rs @@ -1,7 +1,7 @@ //! Generator functions for matrices use ndarray::*; -use rand::prelude::*; +use rand::Rng; use super::convert::*; use super::error::*; @@ -24,7 +24,7 @@ where /// Generate random array with given shape /// -/// - This function uses [rand::thread_rng]. +/// - This function uses [rand::rng]. /// See [random_using] for using another RNG pub fn random(sh: Sh) -> ArrayBase where @@ -33,7 +33,7 @@ where D: Dimension, Sh: ShapeBuilder, { - let mut rng = thread_rng(); + let mut rng = rand::rng(); random_using(sh, &mut rng) } @@ -55,13 +55,13 @@ where /// /// - Be sure that this it **NOT** a uniform distribution. /// Use it only for test purpose. -/// - This function uses [rand::thread_rng]. +/// - This function uses [rand::rng]. /// See [random_unitary_using] for using another RNG. pub fn random_unitary(n: usize) -> Array2 where A: Scalar + Lapack, { - let mut rng = thread_rng(); + let mut rng = rand::rng(); random_unitary_using(n, &mut rng) } @@ -84,13 +84,13 @@ where /// /// - Be sure that this it **NOT** a uniform distribution. /// Use it only for test purpose. -/// - This function uses [rand::thread_rng]. +/// - This function uses [rand::rng]. /// See [random_regular_using] for using another RNG. pub fn random_regular(n: usize) -> Array2 where A: Scalar + Lapack, { - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); random_regular_using(n, &mut rng) } @@ -114,14 +114,14 @@ where /// Random Hermite matrix /// -/// - This function uses [rand::thread_rng]. +/// - This function uses [rand::rng]. /// See [random_hermite_using] for using another RNG. pub fn random_hermite(n: usize) -> ArrayBase where A: Scalar, S: DataOwned + DataMut, { - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); random_hermite_using(n, &mut rng) } @@ -147,7 +147,7 @@ where /// Random Hermite Positive-definite matrix /// /// - Eigenvalue of matrix must be larger than 1 (thus non-singular) -/// - This function uses [rand::thread_rng]. +/// - This function uses [rand::rng]. /// See [random_hpd_using] for using another RNG. /// pub fn random_hpd(n: usize) -> ArrayBase @@ -155,7 +155,7 @@ where A: Scalar, S: DataOwned + DataMut, { - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); random_hpd_using(n, &mut rng) }