Dim in ndarray - Rust

pub struct Dim<I: ?Sized> { /* private fields */ }
Expand description

Dimension description.

Dim describes the number of axes and the length of each axis in an array. It is also used as an index type.

See also the Dimension trait for its methods and operations.

§Examples

To create an array with a particular dimension, you’d just pass a tuple (in this example (3, 2) is used), which is converted to Dim by the array constructor.

use ndarray::Array2;
use ndarray::Dim;

let mut array = Array2::zeros((3, 2));
array[[0, 0]] = 1.;
assert_eq!(array.raw_dim(), Dim([3, 2]));
Source§
Source

Create a new dimension value with n axes, all zeros

Source§
Source§

The resulting type after applying the + operator.

Source§
Source§
Source§

The resulting type after applying the + operator.

Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§

Available on crate feature serde only.

Requires crate feature "serde"

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The sum of the two dimensions.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

The resulting dimension type after broadcasting.

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size of the dimension (number of elements)

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size of the dimension (number of elements)

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size of the dimension (number of elements)

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Compute the size of the dimension (number of elements)

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size of the dimension (number of elements)

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size of the dimension (number of elements)

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None.

Source§

Pattern matching friendly form of the dimension value. Read more

Source§

Next smaller dimension (if applicable)

Source§

Next larger dimension

Source§

Returns the number of dimensions (number of axes).

Source§

Convert the dimension into a pattern matching friendly value.

Source§

Creates a dimension of all zeros with the specified ndim. Read more

Source§

Compute the size of the dimension (number of elements)

Source§

Compute the size while checking for overflow.

Source§

Borrow as a read-only array view.

Source§

Borrow as a read-write array view.

Source§

Convert the dimensional into a dynamic dimensional (IxDyn).

Source§
Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§

The returned type after indexing.

Source§

Performs the indexing (container[index]) operation. Read more

Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§

The resulting type after applying the * operator.

Source§
Source§
Source§

The resulting type after applying the * operator.

Source§
Source§
Source§
Source§
Source§
Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§
Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§
Source§

Remove the specified axis from a dimension.

Source§
Source§

Remove the specified axis from a dimension.

Source§
Source§

Remove the specified axis from a dimension.

Source§
Source§

Remove the specified axis from a dimension.

Source§
Source§

Remove the specified axis from a dimension.

Source§
Source§

Remove the specified axis from a dimension.

Source§
Source§

Remove the specified axis from a dimension.

Source§

Available on crate feature serde only.

Requires crate feature "serde"

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

Dimensionality of the output array.

Source§

Returns the number of axes in the input array.

Source§

Returns the number of axes in the output array.

Source§
Source§

The resulting type after applying the - operator.

Source§
Source§
Source§

The resulting type after applying the - operator.

Source§
Source§
Source§
Source§
Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§

Returns the additive identity element of Self, 0. Read more

Source§

Returns true if self is equal to the additive identity.

Source§

Sets self to the additive identity element of Self, 0.

Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§