Expand description

ndarray prelude.

This module contains the most used types, type aliases, traits, functions, and macros that you can import easily as a group.

use ndarray::prelude::*;


Create an Array with one, two or three dimensions.

Array zip macro: lock step function application across several arrays and producers.

Slice argument constructor.


An n-dimensional array.

An axis index.

Dimension description.

Token to represent a new axis in a slice description.


Argument conversion into an array view

Array shape and index trait.

Floating-point element types f32 and f64.

A trait for Shape and D where D: Dimension that allows customizing the memory layout (strides) of an array shape.


Create a new dimension value.

Create a zero-dimensional index

Create a one-dimensional index

Create a two-dimensional index

Create a three-dimensional index

Create a four-dimensional index

Create a five-dimensional index

Create a six-dimensional index

Create a dynamic-dimensional index

Create a zero-dimensional array with the element x.

Create a one-dimensional array with elements from xs.

Create a two-dimensional array with elements from xs.

Create a zero-dimensional array view borrowing x.

Create a one-dimensional array view with elements borrowing xs.

Create a two-dimensional array view with elements borrowing xs.

Create a one-dimensional read-write array view with elements borrowing xs.

Type Definitions

An array where the data has shared ownership and is copy on write.

An array that owns its data uniquely.

zero-dimensional array

one-dimensional array

two-dimensional array

three-dimensional array

four-dimensional array

five-dimensional array

six-dimensional array

dynamic-dimensional array

A read-only array view.

zero-dimensional array view

one-dimensional array view

two-dimensional array view

three-dimensional array view

four-dimensional array view

five-dimensional array view

six-dimensional array view

dynamic-dimensional array view

A read-write array view.

zero-dimensional read-write array view

one-dimensional read-write array view

two-dimensional read-write array view

three-dimensional read-write array view

four-dimensional read-write array view

five-dimensional read-write array view

six-dimensional read-write array view

dynamic-dimensional read-write array view

An array with copy-on-write behavior.









A read-only array view without a lifetime.

A mutable array view without a lifetime.