@@ -167,7 +167,7 @@ where
167
167
mod cov_tests {
168
168
use super :: * ;
169
169
use rand;
170
- use rand:: distributions:: Range ;
170
+ use rand:: distributions:: Uniform ;
171
171
use ndarray_rand:: RandomExt ;
172
172
173
173
quickcheck ! {
@@ -186,7 +186,7 @@ mod cov_tests {
186
186
let n_observations = 4 ;
187
187
let a = Array :: random(
188
188
( n_random_variables, n_observations) ,
189
- Range :: new( -bound. abs( ) , bound. abs( ) )
189
+ Uniform :: new( -bound. abs( ) , bound. abs( ) )
190
190
) ;
191
191
let covariance = a. cov( 1. ) ;
192
192
covariance. all_close( & covariance. t( ) , 1e-8 )
@@ -200,7 +200,7 @@ mod cov_tests {
200
200
let n_observations = 4 ;
201
201
let a = Array :: random (
202
202
( n_random_variables, n_observations) ,
203
- Range :: new ( 0. , 10. )
203
+ Uniform :: new ( 0. , 10. )
204
204
) ;
205
205
let invalid_ddof = ( n_observations as f64 ) + rand:: random :: < f64 > ( ) . abs ( ) ;
206
206
a. cov ( invalid_ddof) ;
@@ -278,7 +278,7 @@ mod cov_tests {
278
278
#[ cfg( test) ]
279
279
mod pearson_correlation_tests {
280
280
use super :: * ;
281
- use rand:: distributions:: Range ;
281
+ use rand:: distributions:: Uniform ;
282
282
use ndarray_rand:: RandomExt ;
283
283
284
284
quickcheck ! {
@@ -287,7 +287,7 @@ mod pearson_correlation_tests {
287
287
let n_observations = 4 ;
288
288
let a = Array :: random(
289
289
( n_random_variables, n_observations) ,
290
- Range :: new( -bound. abs( ) , bound. abs( ) )
290
+ Uniform :: new( -bound. abs( ) , bound. abs( ) )
291
291
) ;
292
292
let pearson_correlation = a. pearson_correlation( ) ;
293
293
pearson_correlation. all_close( & pearson_correlation. t( ) , 1e-8 )
0 commit comments