Crate ndarray

source ·
Expand description

The ndarray crate provides the Array type, an n-dimensional container similar to numpy’s ndarray.

§Crate Summary and Status

  • Implements the numpy striding scheme for n-dimensional arrays
  • Array is clone on write, so it can be both a view or an owner of the data.
  • Striding and broadcasting is fully implemented
  • Due to iterators, arithmetic operations, matrix multiplication etc are not very well optimized, this is not a serious crate for numerics or linear algebra. Array is a good container.
  • There is no integration with linear algebra packages (at least not yet).

§Crate feature flags

  • assign_ops
    • Optional, requires nightly
    • Enables the compound assignment operators

Modules§

  • A few linear algebra operations on two-dimensional arrays.

Structs§

  • The Array type is an N-dimensional array.
  • An iterator over the elements of an array.
  • An iterator over the elements of an array.
  • An iterator over the indexes and elements of an array.
  • An iterator of the indexes of an array shape.
  • A slice, a description of a range of an array axis.

Constants§

  • Slice value for the full range of an axis.

Traits§

  • Slice or fixed-size array used for array initialization
  • Trait for the shape and index types of arrays.
  • Helper trait to define a larger-than relation for array shapes: removing one axis from Self gives smaller dimension Smaller.

Functions§

  • Return a zero-dimensional array with the element x.
  • Return a one-dimensional array with elements from xs.
  • Return a two-dimensional array with elements from xs.
  • Return a three-dimensional array with elements from xs.

Type Aliases§

  • Array index type
  • Array index type (signed)