Type Definition ndarray::Array [−][src]
Expand description
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:
- Constructor Methods for Owned Arrays
- Methods For All Array Types
- Dimensionality-specific type alises
Array1
,Array2
,Array3
, …,ArrayD
, and so on.
Implementations
Methods specific to Array0
.
See also all methods for ArrayBase
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);
Methods specific to Array
.
See also all methods for ArrayBase
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.