ndarray-rand
Constructors for randomized arrays: rand
's integration with ndarray
.
Example
Generate a 2-dimensional array with shape (2,5)
and elements drawn from a uniform distribution
over the (0., 10.)
interval:
use Array;
use RandomExt;
use Uniform;
Dependencies
ndarray-rand
depends on rand
.
rand
and rand-distr
are
re-exported as sub-modules, ndarray_rand::rand
and ndarray_rand::rand_distr
respectively.
Please rely on these submodules for guaranteed version compatibility.
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 may return errors saying
that the items are not compatible (e.g. that a type doesn't implement a
necessary trait).
Recent changes
Check RELEASES.md to see the changes introduced in previous releases.
License
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.