Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/ind2sub/docs/types/index.d"

Index

Interfaces

Variables

Variables

ind2sub

ind2sub: Ind2Sub

Converts a linear index to an array of subscripts.

Notes

  • The function accepts the following "modes":

    • throw: throws an error when a linear index exceeds array dimensions.
    • wrap: wrap around a linear index exceeding array dimensions using modulo arithmetic.
    • clamp: set a linear index exceeding array dimensions to either 0 (minimum linear index) or the maximum linear index.
param

array shape

param

linear index

param

function options

param

specifies how to handle a linear index which exceeds array dimensions (default: 'throw')

param

specifies whether an array is row-major (C-style) or column-major (Fortran-style) (default: 'row-major')

throws

shape argument must be an array-like object containing nonnegative integers

throws

must provide valid options

throws

must provide a linear index which does not exceed array dimensions

returns

subscripts