Function neuronika::range [−][src]
Expand description
Creates a one-dimensional variable with elements from start to end spaced by step.
The elements range from start
to end
(exclusive).
Panics
If the length is greater than
isize::MAX
.
Examples
use neuronika;
use ndarray::arr1;
let tensor = neuronika::range(0., 5., 1.);
assert!(*tensor.data() == arr1(&[0., 1., 2., 3., 4.]))