Type Definition ndarray::Array[][src]

type Array<A, D> = ArrayBase<OwnedRepr<A>, D>;

An array that owns its data uniquely.

Array is the main n-dimensional array type, and it owns all its array elements.

The Array<A, D> is parameterized by A for the element type and D for the dimensionality.

ArrayBase is used to implement both the owned arrays and the views; see its docs for an overview of all array features.

See also:

Implementations

impl<A> Array<A, Ix0>[src]

Methods specific to Array0.

See also all methods for ArrayBase

pub fn into_scalar(self) -> A[src]

Returns the single element in the array without cloning it.

use ndarray::{arr0, Array0};

// `Foo` doesn't implement `Clone`.
#[derive(Debug, Eq, PartialEq)]
struct Foo;

let array: Array0<Foo> = arr0(Foo);
let scalar: Foo = array.into_scalar();
assert_eq!(scalar, Foo);

impl<A, D> Array<A, D> where
    D: Dimension
[src]

Methods specific to Array.

See also all methods for ArrayBase

pub fn into_raw_vec(self) -> Vec<A>[src]

Return a vector of the elements in the array, in the way they are stored internally.

If the array is in standard memory layout, the logical element order of the array (.iter() order) and of the returned vector will be the same.