Skip to content

Commit

Permalink
ndarray-rand 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Mar 27, 2021
1 parent a77825a commit abb0f9e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
14 changes: 10 additions & 4 deletions ndarray-rand/RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
Recent Changes
--------------

- 0.14.0

- Require ndarray 0.15
- Require rand 0.8 (unchanged from previous version)
- The F32 wrapper is now deprecated, it's redundant

- 0.13.0

- Require ndarray 0.14 (unchanged from previous version)
- Require rand 0.8
- Require rand_distr 0.4
- Fix methods `sample_axis` and `sample_axis_using` so that they can be used on array views too.
- Require ndarray 0.14 (unchanged from previous version)
- Require rand 0.8
- Require rand_distr 0.4
- Fix methods `sample_axis` and `sample_axis_using` so that they can be used on array views too.

- 0.12.0

Expand Down
5 changes: 2 additions & 3 deletions ndarray-rand/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ extern crate test;

use ndarray::Array;
use ndarray_rand::RandomExt;
use ndarray_rand::F32;
use rand_distr::Normal;
use rand_distr::Uniform;

Expand All @@ -19,11 +18,11 @@ fn uniform_f32(b: &mut Bencher) {
#[bench]
fn norm_f32(b: &mut Bencher) {
let m = 100;
b.iter(|| Array::random((m, m), F32(Normal::new(0., 1.).unwrap())));
b.iter(|| Array::random((m, m), Normal::new(0f32, 1.).unwrap()));
}

#[bench]
fn norm_f64(b: &mut Bencher) {
let m = 100;
b.iter(|| Array::random((m, m), Normal::new(0., 1.).unwrap()));
b.iter(|| Array::random((m, m), Normal::new(0f64, 1.).unwrap()));
}
2 changes: 2 additions & 0 deletions ndarray-rand/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ fn get_rng() -> SmallRng {
/// // [ -0.6810, 0.1678, -0.9487, 0.3150, 1.2981]]
/// # }
#[derive(Copy, Clone, Debug)]
#[deprecated(since="0.14.0", note="Redundant with rand 0.8")]
pub struct F32<S>(pub S);

#[allow(deprecated)]
impl<S> Distribution<f32> for F32<S>
where
S: Distribution<f64>,
Expand Down

0 comments on commit abb0f9e

Please sign in to comment.