Crate ndarray_rand

Source
Expand description

Constructors for randomized arrays: rand integration for ndarray.

See RandomExt for usage examples.

§Note

ndarray-rand depends on rand 0.8.

rand and rand_distr are re-exported as sub-modules, ndarray_rand::rand and ndarray_rand::rand_distr respectively. You can use these submodules for guaranteed version compatibility or convenience.

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 same version of rand. Otherwise, the compiler will return errors saying that the items are not compatible (e.g. that a type doesn’t implement a necessary trait).

Modules§

rand
rand, re-exported for convenience and version-compatibility.
rand_distr
rand-distr, re-exported for convenience and version-compatibility.

Enums§

SamplingStrategy
Used as parameter in sample_axis and sample_axis_using to determine if lanes from the original array should only be sampled once (without replacement) or multiple times (with replacement).

Traits§

RandomExt
Constructors for n-dimensional arrays with random elements.