Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/index-modes/docs/types/index.d"

Index

Functions

Functions

modes

  • modes(): Array<string>
  • Returns a list of ndarray index modes.

    Notes

    • The output array contains the following modes:

      • 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.

    Returns Array < string >

    list of ndarray index modes

    Example

    var list = modes();
    // returns [ 'throw', 'clamp', 'wrap' ]