NdArray

Struct NdArray 

Source
pub struct NdArray<'a, T: RawDataType> { /* private fields */ }

Implementations§

Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn value(&self) -> T

Retrieves the single value contained within an ndarray with a singular element.

§Panics

If the ndarray contains more than one element (i.e., it is not a scalar or an ndarray with a single element)

§Example

let ndarray = NdArray::scalar(50f32);
let value = ndarray.value();
assert_eq!(value, 50.0);
§Notes

This function is only meant for arrays that are guaranteed to have exactly one element. For arrays with multiple elements, consider using appropriate methods to access individual elements or slices safely.

Source

pub fn data_slice(&self) -> &'a [T]

Returns a slice of the ndarray’s (flattened) data buffer

§Example

let ndarray = NdArray::new([[50, 60], [-5, -10]]);
let data = ndarray.data_slice();
assert_eq!(data, &[50, 60, -5, -10]);
Source

pub fn into_data_vector(self) -> Vec<T>

Converts an NdArray into its underlying data vector by flattening its dimensions.

§Panics
  • If the ndarray does not own its data (it is a NdArray view).
§Example

let ndarray = NdArray::new([[50, 60], [-5, -10]]);
let data = ndarray.into_data_vector();
assert_eq!(data, vec![50, 60, -5, -10]);
Source§

impl<T: RawDataType> NdArray<'_, T>

Source

pub fn flatiter(&self) -> FlatIterator<T>

Source

pub fn flatiter_ptr(&self) -> BufferIterator<T>

Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn iter(&'a self) -> NdIterator<'a, T>

Source

pub fn iter_along(&'a self, axis: impl AxisType) -> NdIterator<'a, T>

Source

pub fn nditer(&'a self, axes: impl AxesType) -> NdIterator<'a, T>

Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn flatten(&self) -> NdArray<'static, T>

Returns a 1D copy of a flattened multidimensional ndarray.

If copying the data is not desirable, it may be possible to return a view. See NdArray::ravel().

§Examples

let ndarray = NdArray::new([[1, 2, 3], [4, 5, 6]]);
let flat_array = ndarray.flatten();
assert_eq!(flat_array, NdArray::new([1, 2, 3, 4, 5, 6]));
Source§

impl<T: NumericDataType> NdArray<'_, T>

Source

pub fn sum(&self) -> NdArray<'static, T>

Computes the sum of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![1, 2, 3, 4]);
let sum = array.sum();
assert_eq!(sum.value(), 1 + 2 + 3 + 4);
Source

pub fn sum_along(&self, axes: impl ToVec<isize>) -> NdArray<'static, T>

Source

pub fn product(&self) -> NdArray<'static, T>

Computes the product of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![1, 2, 3, 4]);
let prod = array.product();
assert_eq!(prod.value(), 1 * 2 * 3 * 4);
Source

pub fn product_along(&self, axes: impl ToVec<isize>) -> NdArray<'static, T>

Source

pub fn min(&self) -> NdArray<'static, T>

Computes the minimum of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![-1, 3, -7, 8]);
let min = array.min();
assert_eq!(min.value(), -7);
Source

pub fn min_along(&self, axes: impl ToVec<isize>) -> NdArray<'static, T>

Source

pub fn max(&self) -> NdArray<'static, T>

Computes the maximum of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![-1, 3, -7, 8]);
let max = array.max();
assert_eq!(max.value(), 8);
Source

pub fn max_along(&self, axes: impl ToVec<isize>) -> NdArray<'static, T>

Source

pub fn min_magnitude(&self) -> NdArray<'static, T>

Computes the minimum absolute value of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![-1, 3, -7, 8]);
let min = array.min_magnitude();
assert_eq!(min.value(), 1);
Source

pub fn min_magnitude_along( &self, axes: impl ToVec<isize>, ) -> NdArray<'static, T>

Source

pub fn max_magnitude(&self) -> NdArray<'static, T>

Computes the maximum absolute value of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![-1, 3, -9, 8]);
let max = array.max_magnitude();
assert_eq!(max.value(), 9);
Source

pub fn max_magnitude_along( &self, axes: impl ToVec<isize>, ) -> NdArray<'static, T>

Source

pub fn mean(&self) -> NdArray<'static, T>
where T: FloatDataType,

Computes the mean of all elements in the array.

§Example
use redstone_ml::*;

let array = NdArray::new(vec![1.0, 3.0, 5.0, 7.0]);
let mean = array.mean();
assert_eq!(mean.value(), 4.0);
Source

pub fn mean_along(&self, axes: impl ToVec<isize>) -> NdArray<'static, T>
where T: FloatDataType,

Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn slice_along<S: Indexer>(&'a self, axis: Axis, index: S) -> NdArray<'a, T>

Source

pub fn slice<S, I>(&'a self, index: I) -> NdArray<'a, T>
where S: Indexer, I: IntoIterator<Item = S>,

Source§

impl<T: RawDataType> NdArray<'_, T>

Source

pub fn fill(&mut self, value: T)

Fills the entire array with a specified value.

§Example

let mut arr = NdArray::new([1, 2, 4]);
arr.fill(10);
assert_eq!(arr, NdArray::new([10, 10, 10]));
Source§

impl<T: RawDataType + From<bool>> NdArray<'_, T>

Source

pub fn zero(&mut self)

Fills the entire array with a zero (or false if dtype is boolean).

§Example

let mut arr = NdArray::new([1, 2, 4]);
arr.zero();
assert_eq!(arr, NdArray::new([0, 0, 0]));
Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn clone<'r>(&self) -> NdArray<'r, T>

Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn broadcast_to(&'a self, shape: &[usize]) -> NdArray<'a, T>

Broadcasts the NdArray to the specified shape.

This method returns a readonly view of the ndarray with the desired shape. Broadcasting is done by left-padding the ndarray’s shape with ones until they reach the desired dimension. Then, any axes with length 1 are repeated to match the target shape.

For example, suppose the ndarray’s shape is [2, 3] and the broadcast shape is [3, 2, 3]. Then the ndarray’s shape becomes [1, 2, 3] after padding and [3, 2, 3] after repeating the first axis.

§Panics

This method panics if the target shape is incompatible with the ndarray.

  • If shape.len() is less than the dimensionality of the ndarray.
  • If a dimension in shape does not equal the corresponding dimension in the ndarray’s shape and cannot be broadcasted (i.e., it is not 1 or does not match).
§Example
let ndarray = NdArray::new([1, 2, 3]);  // shape is [3]
let broadcasted_array = ndarray.broadcast_to(&[2, 3]);

assert_eq!(broadcasted_array.shape(), &[2, 3]);
Source§

impl<T: NumericDataType> NdArray<'_, T>

Source

pub fn astype<'b, F: NumericDataType>(&self) -> NdArray<'b, F>

Source§

impl<'a, T: MatrixOps> NdArray<'a, T>

Source

pub fn matmul<'r>(&self, other: impl AsRef<NdArray<'a, T>>) -> NdArray<'r, T>

Calculates the matrix product of two ndarrays.

  • If both ndarrays are 1D, then their dot product is returned.
  • If both ndarrays are 2D, then their matrix product is returned.
  • If the first ndarray is 2D and the second ndarray is 1D, then the matrix-vector product is returned.
§Panics
  • If the dimensions/shape of the ndarrays are incompatible
§Example

let a = NdArray::new(vec![
    [1, 2, 3],
    [4, 5, 6],
]);

let b = NdArray::new(vec![
    [7, 8],
    [9, 10],
    [11, 12],
]);

let result = a.matmul(&b);
assert_eq!(result, NdArray::new(vec![
    [58, 64],
    [139, 154],
]));
Source

pub fn bmm<'r>(&self, other: impl AsRef<NdArray<'a, T>>) -> NdArray<'r, T>

Performs batch matrix multiplication on 3D ndarrays.

The shape of the resulting array will be [batch_size, self.shape()[1], other.shape()[2]], where batch_size is the shared first dimension of both input arrays.

§Panics
  • If either array is not 3D
  • If the arrays do not have dimensions compatible for batch matrix multiplication.
§Example

let arr1 = NdArray::<f32>::rand([3, 2, 4]); // 3 batches of 2x4 matrices
let arr2 = NdArray::<f32>::rand([3, 4, 5]); // 3 batches of 4x5 matrices
let result = arr1.bmm(&arr2);
assert_eq!(result.shape(), [3, 2, 5]); // result is 3 batches of 2x5 matrices
Source§

impl<'a, T: SumOfProductsType> NdArray<'a, T>

Source

pub fn dot<'b, 'r>(&self, other: impl AsRef<NdArray<'b, T>>) -> NdArray<'r, T>

Calculates the dot product of two 1D arrays.

§Panics
  • Panics if either array is not 1D
  • Panics if the lengths of the two arrays are not equal
§Examples
let arr1 = NdArray::new([1, 2, 3]);
let arr2 = NdArray::new([4, 5, 6]);
let result = arr1.dot(arr2);
assert_eq!(result.value(), 32); // 1*4 + 2*5 + 3*6 = 32
Source§

impl<'a, T: NumericDataType> NdArray<'a, T>

Source

pub fn trace<'r>(&self) -> NdArray<'r, T>

Returns the trace of the ndarray along its first 2 axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
§Examples
let arr = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

assert_eq!(arr.trace(), NdArray::scalar(1 + 5 + 9));
Source

pub fn offset_trace<'r>(&self, offset: isize) -> NdArray<'r, T>

Returns the sum of an offset ndarray diagonal along its first 2 axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
§Examples
let arr = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

assert_eq!(arr.offset_trace(-1), NdArray::scalar(4 + 8));
Source

pub fn trace_along<'r>( &self, axis1: impl AxisType, axis2: impl AxisType, ) -> NdArray<'r, T>

Returns the trace of an ndarray along the specified axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
  • if axis1 and axis2 are the same or are out-of-bounds
§Examples
let ndarray = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

assert_eq!(ndarray.trace_along(0, 1), NdArray::scalar(1 + 5 + 9));
Source

pub fn offset_trace_along<'r>( &self, offset: isize, axis1: impl AxisType, axis2: impl AxisType, ) -> NdArray<'r, T>

Returns the sum of an offset ndarray diagonal along the specified axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
  • if axis1 and axis2 are the same or are out-of-bounds
§Examples
let ndarray = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

assert_eq!(ndarray.offset_trace_along(1, 0, 1), NdArray::scalar(2 + 6));
Source§

impl<'a, T: RawDataType> NdArray<'a, T>

Source

pub fn diagonal(&'a self) -> NdArray<'a, T>

Returns a diagonal view of the ndarray along its first 2 axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
§Examples
let ndarray = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

let diagonal = ndarray.diagonal();
assert_eq!(diagonal, NdArray::new([1, 5, 9]));
Source

pub fn offset_diagonal(&'a self, offset: isize) -> NdArray<'a, T>

Returns an offset diagonal view of the ndarray along its first 2 axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
§Examples
let ndarray = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

let diagonal = ndarray.offset_diagonal(1);
assert_eq!(diagonal, NdArray::new([2, 6]));
Source

pub fn diagonal_along( &'a self, axis1: impl AxisType, axis2: impl AxisType, ) -> NdArray<'a, T>

Returns a diagonal view of the ndarray along the specified axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
  • if axis1 and axis2 are the same or are out-of-bounds
§Examples
let ndarray = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

let diagonal = ndarray.diagonal_along(Axis(0), Axis(1));  // or .diagonal_along(0, 1)
assert_eq!(diagonal, NdArray::new([1, 5, 9]));
Source

pub fn offset_diagonal_along( &'a self, offset: isize, axis1: impl AxisType, axis2: impl AxisType, ) -> NdArray<'a, T>

Returns an offset diagonal view of the ndarray along the specified axes.

§Panics
  • if the ndarray has fewer than 2 dimensions.
  • if axis1 and axis2 are the same or are out-of-bounds
§Examples
let arr = NdArray::new([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]);

let diagonal = arr.offset_diagonal_along(-1, Axis(0), Axis(1));  // or .offset_diagonal_along(-1, 0, 1)
assert_eq!(diagonal, NdArray::new([4, 8]));

Trait Implementations§

Source§

impl<T: RawDataType + BinaryOpAdd> Add<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> Add<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> Add<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> Add<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> Add<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> Add<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> AddAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn add_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the += operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> AddAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn add_assign(&mut self, rhs: NdArray<'_, T>)

Performs the += operation. Read more
Source§

impl<T: RawDataType + BinaryOpAdd> AddAssign<T> for NdArray<'_, T>

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl<'a, T: RawDataType> AsRef<NdArray<'a, T>> for NdArray<'a, T>

Source§

fn as_ref(&self) -> &NdArray<'a, T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAnd<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAnd<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAnd<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAnd<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAnd<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAnd<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAndAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn bitand_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the &= operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAndAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn bitand_assign(&mut self, rhs: NdArray<'_, T>)

Performs the &= operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitAnd> BitAndAssign<T> for NdArray<'_, T>

Source§

fn bitand_assign(&mut self, rhs: T)

Performs the &= operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOr<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOr<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOr<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOr<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOr<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOr<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOrAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn bitor_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the |= operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOrAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn bitor_assign(&mut self, rhs: NdArray<'_, T>)

Performs the |= operation. Read more
Source§

impl<T: RawDataType + BinaryOpBitOr> BitOrAssign<T> for NdArray<'_, T>

Source§

fn bitor_assign(&mut self, rhs: T)

Performs the |= operation. Read more
Source§

impl<'a, T: RawDataType> Constructors<T> for NdArray<'a, T>

Source§

unsafe fn from_contiguous_owned_buffer(shape: Vec<usize>, data: Vec<T>) -> Self

Constructs a new ndarray from the given data buffer and shape assuming a contiguous layout Read more
Source§

fn new<const D: usize>(data: impl Flatten<T> + Shape + Nested<D>) -> Self

Constructs an n-dimensional NdArray from input data such as a vector or array. Read more
Source§

fn full(n: T, shape: impl ToVec<usize>) -> Self

Creates an ndarray filled with a specified value and given shape. Read more
Source§

fn zeros(shape: impl ToVec<usize>) -> Self
where T: From<bool>,

Creates a new ndarray filled with zeros with the given shape. Read more
Source§

fn ones(shape: impl ToVec<usize>) -> Self
where T: From<bool>,

Creates a new ndarray filled with ones with the given shape. Read more
Source§

fn scalar(n: T) -> Self

Creates a 0-dimensional (shapeless) ndarray containing a single value. Read more
Source§

fn arange(start: T, stop: T) -> Self
where T: NumericDataType,

Generates a 1D ndarray with evenly spaced values within a specified range. Read more
Source§

fn arange_with_step(start: T, stop: T, step: T) -> Self
where T: NumericDataType,

Generates a 1D ndarray with evenly spaced values within a specified range. Read more
Source§

fn linspace(start: T, stop: T, num: usize) -> Self
where T: FloatDataType,

Generates a 1-dimensional ndarray with num evenly spaced values between start and stop (inclusive). Read more
Source§

fn linspace_exclusive(start: T, stop: T, num: usize) -> Self
where T: FloatDataType,

Generates a 1-dimensional ndarray with num evenly spaced values between start and stop (exclusive). Read more
Source§

impl<T: RawDataType> Debug for NdArray<'_, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> Div<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> Div<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> Div<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> Div<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> Div<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> Div<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> DivAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn div_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the /= operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> DivAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn div_assign(&mut self, rhs: NdArray<'_, T>)

Performs the /= operation. Read more
Source§

impl<T: RawDataType + BinaryOpDiv> DivAssign<T> for NdArray<'_, T>

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T: RawDataType> Drop for NdArray<'_, T>

Source§

fn drop(&mut self)

This method is implicitly invoked when the ndarray is deleted to clean up its memory if the ndarray owns its data (i.e. it is not a view into another ndarray ).

Resets self.len and self.capacity to 0.

Source§

impl<T: RawDataType, const D: usize> Index<[usize; D]> for NdArray<'_, T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: [usize; D]) -> &Self::Output

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

impl<T: RawDataType> Index<usize> for NdArray<'_, T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

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

impl<T: RawDataType, const D: usize> IndexMut<[usize; D]> for NdArray<'_, T>

Source§

fn index_mut(&mut self, index: [usize; D]) -> &mut Self::Output

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

impl<T: RawDataType> IndexMut<usize> for NdArray<'_, T>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

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

impl<T: RawDataType + BinaryOpMul> Mul<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> Mul<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> Mul<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> Mul<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> Mul<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> Mul<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> MulAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn mul_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the *= operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> MulAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn mul_assign(&mut self, rhs: NdArray<'_, T>)

Performs the *= operation. Read more
Source§

impl<T: RawDataType + BinaryOpMul> MulAssign<T> for NdArray<'_, T>

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T: RawDataType + UnaryOps> Neg for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: RawDataType + UnaryOps> Neg for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: RawDataType> PartialEq<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn eq(&self, other: &&NdArray<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<T: TensorDataType> PartialEq<&Tensor<'_, T>> for NdArray<'_, T>

Source§

fn eq(&self, other: &&Tensor<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<T: RawDataType> PartialEq<NdArray<'_, T>> for &NdArray<'_, T>

Source§

fn eq(&self, other: &NdArray<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<T: RawDataType> PartialEq<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn eq(&self, other: &NdArray<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<T: TensorDataType> PartialEq<NdArray<'_, T>> for Tensor<'_, T>

Source§

fn eq(&self, other: &NdArray<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<T: TensorDataType> PartialEq<Tensor<'_, T>> for &NdArray<'_, T>

Source§

fn eq(&self, other: &Tensor<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<T: TensorDataType> PartialEq<Tensor<'_, T>> for NdArray<'_, T>

Source§

fn eq(&self, other: &Tensor<'_, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl<'a, T: RawDataType> RandomConstructors<T> for NdArray<'a, T>

Source§

fn randn(shape: impl ToVec<usize>) -> Self
where T: FloatDataType,

Samples an NdArray with the specified shape from a standard normal distribution (0 mean, unit standard deviation). Read more
Source§

fn rand(shape: impl ToVec<usize>) -> Self
where T: FloatDataType,

Samples an NdArray with the specified shape with values uniformly distributed in [0, 1). Read more
Source§

fn uniform(shape: impl ToVec<usize>, low: T, high: T) -> Self
where T: FloatDataType,

Samples an NdArray with the specified shape with values uniformly distributed in [low, high). Read more
Source§

fn randint(shape: impl ToVec<usize>, low: T, high: T) -> Self
where T: NumericDataType,

Samples an NdArray with the specified shape with integer values uniformly distributed between low (inclusive) and high (exclusive). Read more
Source§

impl<T: RawDataType + BinaryOpRem> Rem<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> Rem<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> Rem<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> Rem<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> Rem<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> Rem<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> RemAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn rem_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the %= operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> RemAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn rem_assign(&mut self, rhs: NdArray<'_, T>)

Performs the %= operation. Read more
Source§

impl<T: RawDataType + BinaryOpRem> RemAssign<T> for NdArray<'_, T>

Source§

fn rem_assign(&mut self, rhs: T)

Performs the %= operation. Read more
Source§

impl<'a, T: RawDataType> Reshape<T> for &'a NdArray<'a, T>

Source§

type Output = NdArray<'a, T>

Source§

unsafe fn reshaped_view( self, shape: Vec<usize>, stride: Vec<usize>, ) -> Self::Output

Provides a non-owning view of the ndarray with the specified shape and stride. The data pointed to by the view is shared with the original ndarray. Read more
Source§

fn view(self) -> Self::Output

Provides a non-owning view of the ndarray that shares its data with the original ndarray. Read more
Source§

fn reshape(self, new_shape: impl ToVec<usize>) -> Self::Output

Reshapes the ndarray into the specified shape. Read more
Source§

fn squeeze(self) -> Self::Output

Removes all singleton dimensions (dimensions of size 1) from the ndarray’s shape. Read more
Source§

fn unsqueeze(self, axis: impl AxisType) -> Self::Output

Adds a singleton dimension (dimensions of size 1) to the ndarray at the specified axis. Read more
Source§

fn T(self) -> Self::Output

Transposes the array along the first 2 dimensions. Read more
Source§

fn transpose(self, axis1: impl AxisType, axis2: impl AxisType) -> Self::Output

Returns a transposed version of the array, swapping the specified axes. Read more
Source§

impl<T: RawDataType> Reshape<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

Source§

unsafe fn reshaped_view( self, shape: Vec<usize>, stride: Vec<usize>, ) -> Self::Output

Provides a non-owning view of the ndarray with the specified shape and stride. The data pointed to by the view is shared with the original ndarray. Read more
Source§

fn view(self) -> Self::Output

Provides a non-owning view of the ndarray that shares its data with the original ndarray. Read more
Source§

fn reshape(self, new_shape: impl ToVec<usize>) -> Self::Output

Reshapes the ndarray into the specified shape. Read more
Source§

fn squeeze(self) -> Self::Output

Removes all singleton dimensions (dimensions of size 1) from the ndarray’s shape. Read more
Source§

fn unsqueeze(self, axis: impl AxisType) -> Self::Output

Adds a singleton dimension (dimensions of size 1) to the ndarray at the specified axis. Read more
Source§

fn T(self) -> Self::Output

Transposes the array along the first 2 dimensions. Read more
Source§

fn transpose(self, axis1: impl AxisType, axis2: impl AxisType) -> Self::Output

Returns a transposed version of the array, swapping the specified axes. Read more
Source§

impl<T: RawDataType + BinaryOpShl> Shl<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> Shl<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> Shl<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> Shl<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> Shl<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> Shl<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> ShlAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn shl_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the <<= operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> ShlAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn shl_assign(&mut self, rhs: NdArray<'_, T>)

Performs the <<= operation. Read more
Source§

impl<T: RawDataType + BinaryOpShl> ShlAssign<T> for NdArray<'_, T>

Source§

fn shl_assign(&mut self, rhs: T)

Performs the <<= operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> Shr<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> Shr<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> Shr<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> Shr<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> Shr<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> Shr<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> ShrAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn shr_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the >>= operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> ShrAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn shr_assign(&mut self, rhs: NdArray<'_, T>)

Performs the >>= operation. Read more
Source§

impl<T: RawDataType + BinaryOpShr> ShrAssign<T> for NdArray<'_, T>

Source§

fn shr_assign(&mut self, rhs: T)

Performs the >>= operation. Read more
Source§

impl<T: RawDataType> StridedMemory for &NdArray<'_, T>

Source§

fn shape(&self) -> &[usize]

Returns the dimensions of the ndarray along each axis. Read more
Source§

fn stride(&self) -> &[usize]

Returns the stride of the ndarray. Read more
Source§

fn flags(&self) -> NdArrayFlags

Returns flags containing information about various ndarray metadata.
Source§

fn ndims(&self) -> usize

Returns the number of dimensions in the ndarray. Read more
Source§

fn len(&self) -> usize

Returns the length along the first dimension of the ndarray. If the ndarray is a scalar, this returns 0. Read more
Source§

fn size(&self) -> usize

Returns the total number of elements in the ndarray. Read more
Source§

fn is_contiguous(&self) -> bool

Returns whether this ndarray is stored contiguously in memory. Read more
Source§

fn is_view(&self) -> bool

Returns whether this ndarray is slice of another ndarray. Read more
Source§

fn is_uniformly_strided(&self) -> bool

Whether the elements of this ndarray are stored in memory with a uniform distance between them. Read more
Source§

fn has_uniform_stride(&self) -> Option<usize>

If the elements of this ndarray are stored in memory with a uniform distance between them, returns this distance. Read more
Source§

impl<T: RawDataType> StridedMemory for NdArray<'_, T>

Source§

fn shape(&self) -> &[usize]

Returns the dimensions of the ndarray along each axis. Read more
Source§

fn stride(&self) -> &[usize]

Returns the stride of the ndarray. Read more
Source§

fn flags(&self) -> NdArrayFlags

Returns flags containing information about various ndarray metadata.
Source§

fn ndims(&self) -> usize

Returns the number of dimensions in the ndarray. Read more
Source§

fn len(&self) -> usize

Returns the length along the first dimension of the ndarray. If the ndarray is a scalar, this returns 0. Read more
Source§

fn size(&self) -> usize

Returns the total number of elements in the ndarray. Read more
Source§

fn is_contiguous(&self) -> bool

Returns whether this ndarray is stored contiguously in memory. Read more
Source§

fn is_view(&self) -> bool

Returns whether this ndarray is slice of another ndarray. Read more
Source§

fn is_uniformly_strided(&self) -> bool

Whether the elements of this ndarray are stored in memory with a uniform distance between them. Read more
Source§

fn has_uniform_stride(&self) -> Option<usize>

If the elements of this ndarray are stored in memory with a uniform distance between them, returns this distance. Read more
Source§

impl<T: RawDataType + BinaryOpSub> Sub<&NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> Sub<&NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NdArray<'_, T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> Sub<NdArray<'_, T>> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> Sub<NdArray<'_, T>> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NdArray<'_, T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> Sub<T> for &NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> Sub<T> for NdArray<'_, T>

Source§

type Output = NdArray<'static, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> SubAssign<&NdArray<'_, T>> for NdArray<'_, T>

Source§

fn sub_assign(&mut self, rhs: &NdArray<'_, T>)

Performs the -= operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> SubAssign<NdArray<'_, T>> for NdArray<'_, T>

Source§

fn sub_assign(&mut self, rhs: NdArray<'_, T>)

Performs the -= operation. Read more
Source§

impl<T: RawDataType + BinaryOpSub> SubAssign<T> for NdArray<'_, T>

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for NdArray<'a, T>

§

impl<'a, T> RefUnwindSafe for NdArray<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> !Send for NdArray<'a, T>

§

impl<'a, T> !Sync for NdArray<'a, T>

§

impl<'a, T> Unpin for NdArray<'a, T>

§

impl<'a, T> UnwindSafe for NdArray<'a, T>
where T: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,