Skip to content

Commit 04bedd1

Browse files
committed
rand: Update to use ndarray 0.6
1 parent 98d2dc9 commit 04bedd1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ndarray-rand/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ keywords = ["multidimensional", "matrix", "rand", "ndarray"]
1313

1414
[dependencies]
1515
rand = "0.3"
16-
ndarray = { version = ">= 0.4.9, < 0.6", path = ".." }
16+
ndarray = { version = "0.6", path = ".." }

ndarray-rand/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,12 @@ impl<S, D> RandomExt<S, D> for ArrayBase<S, D>
7575
Self::random_using(dim, dist, &mut rand::weak_rng())
7676
}
7777

78-
#[allow(deprecated)] // from_vec_dim
7978
fn random_using<IdS, R>(dim: D, dist: IdS, rng: &mut R) -> ArrayBase<S, D>
8079
where IdS: IndependentSample<S::Elem>,
8180
R: Rng
8281
{
8382
let elements = Vec::from_iter((0..dim.size()).map(move |_| dist.ind_sample(rng)));
84-
Self::from_vec_dim(dim, elements).unwrap()
83+
Self::from_shape_vec(dim, elements).unwrap()
8584
}
8685
}
8786

0 commit comments

Comments
 (0)