diff --git a/Cargo.lock b/Cargo.lock
index de366de05..78ad9b972 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -153,6 +153,17 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+[[package]]
+name = "chacha20"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "rand_core 0.10.1",
+]
+
[[package]]
name = "cmake"
version = "0.1.58"
@@ -162,6 +173,15 @@ dependencies = [
"cc",
]
+[[package]]
+name = "cpufeatures"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "crc32fast"
version = "1.5.0"
@@ -518,11 +538,11 @@ dependencies = [
[[package]]
name = "ndarray-rand"
-version = "0.16.0"
+version = "0.17.0"
dependencies = [
"ndarray",
"quickcheck",
- "rand 0.9.4",
+ "rand 0.10.1",
"rand_distr",
"rand_isaac",
]
@@ -585,7 +605,7 @@ dependencies = [
"num-complex",
"num-traits",
"openblas-src",
- "rand 0.9.4",
+ "rand 0.10.1",
"rand_distr",
]
@@ -762,6 +782,7 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
dependencies = [
+ "chacha20",
"getrandom 0.4.2",
"rand_core 0.10.1",
]
@@ -793,21 +814,21 @@ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
[[package]]
name = "rand_distr"
-version = "0.5.1"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463"
+checksum = "4d431c2703ccf129de4d45253c03f49ebb22b97d6ad79ee3ecfc7e3f4862c1d8"
dependencies = [
"num-traits",
- "rand 0.9.4",
+ "rand 0.10.1",
]
[[package]]
name = "rand_isaac"
-version = "0.4.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3382fc9f0aad4f2e2a56b53d9133c8c810b4dbf21e7e370e24346161a5b2c7bd"
+checksum = "62cb7dedb2feaa5c3ea9f47b7d6f5bde397a2dd7d0305a0cd35b51588607f415"
dependencies = [
- "rand_core 0.9.5",
+ "rand_core 0.10.1",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index df07302ea..f3522b214 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -105,8 +105,8 @@ num-complex = { version = "0.4", default-features = false }
approx = { version = "0.5", default-features = false }
quickcheck = { version = "1.0", default-features = false }
proptest = { version = "1.3.1" }
-rand = { version = "0.9.0", features = ["small_rng"] }
-rand_distr = { version = "0.5.0" }
+rand = { version = "0.10.0" }
+rand_distr = { version = "0.6.0" }
itertools = { version = "0.13.0", default-features = false, features = ["use_std"] }
cblas-sys = { version = "0.1.4", default-features = false }
diff --git a/README-quick-start.md b/README-quick-start.md
index 84e968744..fd634d688 100644
--- a/README-quick-start.md
+++ b/README-quick-start.md
@@ -306,7 +306,7 @@ use std::iter::FromIterator;
fn main() {
// Or you may use ndarray_rand crate to generate random arrays
- // let a = Array::random((2, 5), Uniform::new(0., 10.));
+ // let a = Array::random((2, 5), Uniform::new(0., 10.).unwrap());
let a = array![
[3., 7., 3., 4.],
diff --git a/crates/numeric-tests/tests/accuracy.rs b/crates/numeric-tests/tests/accuracy.rs
index db10d57cd..d6269be9b 100644
--- a/crates/numeric-tests/tests/accuracy.rs
+++ b/crates/numeric-tests/tests/accuracy.rs
@@ -10,7 +10,7 @@ use std::fmt;
use ndarray_rand::RandomExt;
use rand::rngs::SmallRng;
-use rand::{Rng, SeedableRng};
+use rand::{RngExt, SeedableRng};
use ndarray::linalg::general_mat_mul;
use ndarray::prelude::*;
@@ -86,7 +86,7 @@ where
#[test]
fn accurate_eye_f32()
{
- let rng = &mut SmallRng::from_os_rng();
+ let rng = &mut SmallRng::from_rng(&mut rand::rng());
for i in 0..20 {
let eye = Array::eye(i);
for j in 0..20 {
@@ -114,7 +114,7 @@ fn accurate_eye_f32()
#[test]
fn accurate_eye_f64()
{
- let rng = &mut SmallRng::from_os_rng();
+ let rng = &mut SmallRng::from_rng(&mut rand::rng());
let abs_tol = 1e-15;
for i in 0..20 {
let eye = Array::eye(i);
@@ -209,7 +209,7 @@ where
A: fmt::Debug,
{
// pick a few random sizes
- let mut rng = SmallRng::from_os_rng();
+ let mut rng = SmallRng::from_rng(&mut rand::rng());
for i in 0..20 {
let (c, reference) = random_matrix_mul(&mut rng, i > 10, use_general, gen::);
@@ -241,7 +241,7 @@ where
A: fmt::Debug,
{
// pick a few random sizes
- let mut rng = SmallRng::from_os_rng();
+ let mut rng = SmallRng::from_rng(&mut rand::rng());
for i in 0..20 {
let (c, reference) = random_matrix_mul(&mut rng, i > 10, true, gen_complex::);
@@ -259,7 +259,7 @@ where
fn accurate_mul_with_column_f64()
{
// pick a few random sizes
- let rng = &mut SmallRng::from_os_rng();
+ let rng = &mut SmallRng::from_rng(&mut rand::rng());
for i in 0..10 {
let m = rng.random_range(1..128);
let k = rng.random_range(1..350);
diff --git a/ndarray-rand/Cargo.toml b/ndarray-rand/Cargo.toml
index b7169f304..7cc4e69c5 100644
--- a/ndarray-rand/Cargo.toml
+++ b/ndarray-rand/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ndarray-rand"
-version = "0.16.0"
+version = "0.17.0"
edition = "2018"
authors = ["bluss"]
license = "MIT OR Apache-2.0"
@@ -29,7 +29,7 @@ rand_distr = { workspace = true }
quickcheck = { workspace = true, optional = true }
[dev-dependencies]
-rand_isaac = "0.4.0"
+rand_isaac = "0.5.0"
quickcheck = { workspace = true }
[package.metadata.release]
diff --git a/ndarray-rand/README.md b/ndarray-rand/README.md
index 0109e9732..fb9c1acc1 100644
--- a/ndarray-rand/README.md
+++ b/ndarray-rand/README.md
@@ -15,7 +15,7 @@ use ndarray_rand::RandomExt;
use ndarray_rand::rand_distr::Uniform;
fn main() {
- let a = Array::random((2, 5), Uniform::new(0., 10.));
+ let a = Array::random((2, 5), Uniform::new(0., 10.).unwrap());
println!("{:8.4}", a);
// Example Output:
// [[ 8.6900, 6.9824, 3.8922, 6.5861, 2.4890],
diff --git a/ndarray-rand/RELEASES.md b/ndarray-rand/RELEASES.md
index d4e1dde2e..2ec55ffc9 100644
--- a/ndarray-rand/RELEASES.md
+++ b/ndarray-rand/RELEASES.md
@@ -1,6 +1,10 @@
Recent Changes
--------------
+- 0.17.0
+
+ - Bump `rand` to 0.10.0 and `rand_distr` to 0.6.0
+
- 0.16.0
- Require ndarray 0.17.1
diff --git a/ndarray-rand/src/lib.rs b/ndarray-rand/src/lib.rs
index d155695aa..8dd281129 100644
--- a/ndarray-rand/src/lib.rs
+++ b/ndarray-rand/src/lib.rs
@@ -12,7 +12,7 @@
//!
//! ## Note
//!
-//! `ndarray-rand` depends on [`rand` 0.9][rand].
+//! `ndarray-rand` depends on [`rand` 0.10][rand].
//!
//! [`rand`][rand] and [`rand_distr`][rand_distr]
//! are re-exported as sub-modules, [`ndarray_rand::rand`](rand)
@@ -20,8 +20,8 @@
//! You can use these submodules for guaranteed version compatibility or
//! convenience.
//!
-//! [rand]: https://docs.rs/rand/0.9
-//! [rand_distr]: https://docs.rs/rand_distr/0.5
+//! [rand]: https://docs.rs/rand/0.10
+//! [rand_distr]: https://docs.rs/rand_distr/0.6
//!
//! If you want to use a random number generator or distribution from another crate
//! with `ndarray-rand`, you need to make sure that the other crate also depends on the