Skip to content

Commit 9322664

Browse files
committed
Bump rand from 0.8 to 0.9
1 parent 44df860 commit 9322664

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

lax/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ intel-mkl-system = ["intel-mkl-src/mkl-dynamic-lp64-seq"]
3030

3131
[dependencies]
3232
thiserror = "2.0.0"
33-
cauchy = "0.4.0"
33+
cauchy = {git="https://github.com/Dirreke/cauchy.git", branch="bump-rand"}
3434
num-traits = "0.2.14"
3535
lapack-sys = "0.15.0"
3636
katexit = "0.1.2"

ndarray-linalg/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ intel-mkl-static = ["lax/intel-mkl-static"]
3030
intel-mkl-system = ["lax/intel-mkl-system"]
3131

3232
[dependencies]
33-
cauchy = "0.4.0"
33+
cauchy = {git="https://github.com/Dirreke/cauchy.git", branch="bump-rand"}
3434
katexit = "0.1.2"
35-
num-complex = "0.4.0"
35+
num-complex = {git="https://github.com/Dirreke/num-complex.git", branch="bump-rand"}
3636
num-traits = "0.2.14"
37-
rand = "0.8.3"
37+
rand = "0.9"
3838
thiserror = "2.0.0"
3939

4040
[dependencies.ndarray]
@@ -52,7 +52,7 @@ paste = "1.0.5"
5252
criterion = "0.5.1"
5353
# Keep the same version as ndarray's dependency!
5454
approx = { version = "0.5", features = ["num-complex"] }
55-
rand_pcg = "0.3.1"
55+
rand_pcg = "0.9"
5656

5757
[[bench]]
5858
name = "truncated_eig"

ndarray-linalg/src/generate.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Generator functions for matrices
22
33
use ndarray::*;
4-
use rand::prelude::*;
4+
use rand::Rng;
55

66
use super::convert::*;
77
use super::error::*;
@@ -24,7 +24,7 @@ where
2424

2525
/// Generate random array with given shape
2626
///
27-
/// - This function uses [rand::thread_rng].
27+
/// - This function uses [rand::rng].
2828
/// See [random_using] for using another RNG
2929
pub fn random<A, S, Sh, D>(sh: Sh) -> ArrayBase<S, D>
3030
where
@@ -33,7 +33,7 @@ where
3333
D: Dimension,
3434
Sh: ShapeBuilder<Dim = D>,
3535
{
36-
let mut rng = thread_rng();
36+
let mut rng = rand::rng();
3737
random_using(sh, &mut rng)
3838
}
3939

@@ -55,13 +55,13 @@ where
5555
///
5656
/// - Be sure that this it **NOT** a uniform distribution.
5757
/// Use it only for test purpose.
58-
/// - This function uses [rand::thread_rng].
58+
/// - This function uses [rand::rng].
5959
/// See [random_unitary_using] for using another RNG.
6060
pub fn random_unitary<A>(n: usize) -> Array2<A>
6161
where
6262
A: Scalar + Lapack,
6363
{
64-
let mut rng = thread_rng();
64+
let mut rng = rand::rng();
6565
random_unitary_using(n, &mut rng)
6666
}
6767

@@ -84,13 +84,13 @@ where
8484
///
8585
/// - Be sure that this it **NOT** a uniform distribution.
8686
/// Use it only for test purpose.
87-
/// - This function uses [rand::thread_rng].
87+
/// - This function uses [rand::rng].
8888
/// See [random_regular_using] for using another RNG.
8989
pub fn random_regular<A>(n: usize) -> Array2<A>
9090
where
9191
A: Scalar + Lapack,
9292
{
93-
let mut rng = rand::thread_rng();
93+
let mut rng = rand::rng();
9494
random_regular_using(n, &mut rng)
9595
}
9696

@@ -114,14 +114,14 @@ where
114114

115115
/// Random Hermite matrix
116116
///
117-
/// - This function uses [rand::thread_rng].
117+
/// - This function uses [rand::rng].
118118
/// See [random_hermite_using] for using another RNG.
119119
pub fn random_hermite<A, S>(n: usize) -> ArrayBase<S, Ix2>
120120
where
121121
A: Scalar,
122122
S: DataOwned<Elem = A> + DataMut,
123123
{
124-
let mut rng = rand::thread_rng();
124+
let mut rng = rand::rng();
125125
random_hermite_using(n, &mut rng)
126126
}
127127

@@ -147,15 +147,15 @@ where
147147
/// Random Hermite Positive-definite matrix
148148
///
149149
/// - Eigenvalue of matrix must be larger than 1 (thus non-singular)
150-
/// - This function uses [rand::thread_rng].
150+
/// - This function uses [rand::rng].
151151
/// See [random_hpd_using] for using another RNG.
152152
///
153153
pub fn random_hpd<A, S>(n: usize) -> ArrayBase<S, Ix2>
154154
where
155155
A: Scalar,
156156
S: DataOwned<Elem = A> + DataMut,
157157
{
158-
let mut rng = rand::thread_rng();
158+
let mut rng = rand::rng();
159159
random_hpd_using(n, &mut rng)
160160
}
161161

0 commit comments

Comments
 (0)