Function ndarray::aview1
[−]
[src]
pub fn aview1<A>(xs: &[A]) -> ArrayView1<A>
Create a one-dimensional array view with elements borrowing xs
.
use ndarray::aview1; let data = [1.0; 1024]; // Create a 2D array view from borrowed data let a2d = aview1(&data).into_shape((32, 32)).unwrap(); assert!( a2d.scalar_sum() == 1024.0 );Run