Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "@stdlib/types/ndarray"

Module containing ndarray definitions.

Index

Type aliases

ComplexDataType

ComplexDataType: "complex64" | "complex128"

Data type for complex number ndarrays.

DataType

DataType: RealOrComplexDataType | "binary" | "generic"

Data type.

FloatDataType

FloatDataType: "float64" | "float32"

Data type for floating-point ndarrays.

FloatOrComplexDataType

FloatOrComplexDataType: FloatDataType | ComplexDataType

Data type for floating-point real or complex ndarrays.

IntegerDataType

Data type for integer ndarrays.

Mode

Mode: "throw" | "clamp" | "wrap"

Array index mode.

Notes

  • The following index modes are supported:

    • throw: specifies that a function should throw an error when an index is outside a restricted interval.
    • wrap: specifies that a function should wrap around an index using modulo arithmetic.
    • clamp: specifies that a function should set an index less than zero to zero (minimum index) and set an index greater than a maximum index value to the maximum possible index.

Order

Order: "row-major" | "column-major"

Array order.

Notes

  • The array order is either row-major (C-style) or column-major (Fortran-style).

RealDataType

Data type for real-valued ndarrays.

RealOrComplexDataType

RealOrComplexDataType: RealDataType | ComplexDataType

Data type for real-valued or complex number ndarrays.

Shape

Shape: ArrayLike<number>

Array shape.

Notes

  • Each element of the array shape (i.e., dimension size) should be a nonnegative integer.

SignedIntegerDataType

SignedIntegerDataType: "int32" | "int16" | "int8"

Data type for signed integer ndarrays.

Strides

Strides: ArrayLike<number>

Array strides.

Notes

  • Each stride (i.e., index increment along a respective dimension) should be an integer.

UnsignedIntegerDataType

UnsignedIntegerDataType: "uint32" | "uint16" | "uint8" | "uint8c"

Data type for unsigned integer ndarrays.