Skip to content

Commit 599b4fd

Browse files
committed
Update to rand 0.6 and ndarray-rand 0.9
1 parent bddb050 commit 599b4fd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ categories = ["data-structures", "science"]
1717
ndarray = "0.12.1"
1818
noisy_float = "0.1.8"
1919
num-traits = "0.2"
20-
rand = "0.5"
20+
rand = "0.6"
2121
itertools = { version = "0.7.0", default-features = false }
2222

2323
[dev-dependencies]
2424
quickcheck = "0.7"
25-
ndarray-rand = "0.8"
25+
ndarray-rand = "0.9"

src/correlation.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ where
167167
mod cov_tests {
168168
use super::*;
169169
use rand;
170-
use rand::distributions::Range;
170+
use rand::distributions::Uniform;
171171
use ndarray_rand::RandomExt;
172172

173173
quickcheck! {
@@ -186,7 +186,7 @@ mod cov_tests {
186186
let n_observations = 4;
187187
let a = Array::random(
188188
(n_random_variables, n_observations),
189-
Range::new(-bound.abs(), bound.abs())
189+
Uniform::new(-bound.abs(), bound.abs())
190190
);
191191
let covariance = a.cov(1.);
192192
covariance.all_close(&covariance.t(), 1e-8)
@@ -200,7 +200,7 @@ mod cov_tests {
200200
let n_observations = 4;
201201
let a = Array::random(
202202
(n_random_variables, n_observations),
203-
Range::new(0., 10.)
203+
Uniform::new(0., 10.)
204204
);
205205
let invalid_ddof = (n_observations as f64) + rand::random::<f64>().abs();
206206
a.cov(invalid_ddof);
@@ -278,7 +278,7 @@ mod cov_tests {
278278
#[cfg(test)]
279279
mod pearson_correlation_tests {
280280
use super::*;
281-
use rand::distributions::Range;
281+
use rand::distributions::Uniform;
282282
use ndarray_rand::RandomExt;
283283

284284
quickcheck! {
@@ -287,7 +287,7 @@ mod pearson_correlation_tests {
287287
let n_observations = 4;
288288
let a = Array::random(
289289
(n_random_variables, n_observations),
290-
Range::new(-bound.abs(), bound.abs())
290+
Uniform::new(-bound.abs(), bound.abs())
291291
);
292292
let pearson_correlation = a.pearson_correlation();
293293
pearson_correlation.all_close(&pearson_correlation.t(), 1e-8)

0 commit comments

Comments
 (0)