diff --git a/lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts index 4be2771201ff..d57f89c855eb 100644 --- a/lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts @@ -52,6 +52,7 @@ import bufferDataTypeEnum = require( '@stdlib/ndarray/base/buffer-dtype-enum' ); import bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' ); import char2dtype = require( '@stdlib/ndarray/base/char2dtype' ); import clampIndex = require( '@stdlib/ndarray/base/clamp-index' ); +import clipIndex = require( '@stdlib/ndarray/base/clip-index' ); import complementShape = require( '@stdlib/ndarray/base/complement-shape' ); import consensusOrder = require( '@stdlib/ndarray/base/consensus-order' ); import copy = require( '@stdlib/ndarray/base/copy' ); @@ -1248,6 +1249,25 @@ interface Namespace { */ clampIndex: typeof clampIndex; + /** + * Clips an index to the interval `[0,max]`. + * + * @param idx - index + * @param max - maximum index + * @returns index + * + * @example + * var idx = ns.clipIndex( -2, 10 ); + * // returns 8 + * + * idx = ns.clipIndex( 15, 10 ); + * // returns 10 + * + * idx = ns.clipIndex( 5, 10 ); + * // returns 5 + */ + clipIndex: typeof clipIndex; + /** * Returns the shape defined by the dimensions which are not included in a list of dimensions. *