From 50467499362cedb25c2cf59edde5aca1d91d8b69 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:29:09 +0000 Subject: [PATCH] feat: update `blas/ext/base/ndarray` TypeScript declarations Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> --- .../ext/base/ndarray/docs/types/index.d.ts | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts index 1b4aa3c1917b..1b86f1937ce6 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts @@ -117,6 +117,7 @@ import gcopyWithin = require( '@stdlib/blas/ext/base/ndarray/gcopy-within' ); import gcuany = require( '@stdlib/blas/ext/base/ndarray/gcuany' ); import gcuevery = require( '@stdlib/blas/ext/base/ndarray/gcuevery' ); import gcunone = require( '@stdlib/blas/ext/base/ndarray/gcunone' ); +import gcusome = require( '@stdlib/blas/ext/base/ndarray/gcusome' ); import gcusum = require( '@stdlib/blas/ext/base/ndarray/gcusum' ); import gcusumkbn = require( '@stdlib/blas/ext/base/ndarray/gcusumkbn' ); import gcusumkbn2 = require( '@stdlib/blas/ext/base/ndarray/gcusumkbn2' ); @@ -132,6 +133,7 @@ import gfillLessThan = require( '@stdlib/blas/ext/base/ndarray/gfill-less-than' import gfillNaN = require( '@stdlib/blas/ext/base/ndarray/gfill-nan' ); import gfillNotEqual = require( '@stdlib/blas/ext/base/ndarray/gfill-not-equal' ); import gfindIndex = require( '@stdlib/blas/ext/base/ndarray/gfind-index' ); +import gfindIndexBetween = require( '@stdlib/blas/ext/base/ndarray/gfind-index-between' ); import gfindLastIndex = require( '@stdlib/blas/ext/base/ndarray/gfind-last-index' ); import gfirstIndexEqual = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-equal' ); import gfirstIndexGreaterThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-greater-than' ); @@ -3217,6 +3219,38 @@ interface Namespace { */ gcunone: typeof gcunone; + /** + * Cumulatively tests whether at least `k` elements in a one-dimensional ndarray are truthy. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * - a zero-dimensional ndarray containing the minimum number of truthy elements. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var BooleanVector = require( '@stdlib/ndarray/vector/bool' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = vector( [ 0.0, 1.0, 1.0, 0.0 ], 'generic' ); + * var out = new BooleanVector( 4 ); + * + * var k = scalar2ndarray( 2 ); + * + * var z = ns.gcusome( [ x, out, k ] ); + * // returns [ false, false, true, true ] + * + * var bool = ( z === out ); + * // returns true + */ + gcusome: typeof gcusome; + /** * Computes the cumulative sum of a one-dimensional ndarray. * @@ -3793,6 +3827,47 @@ interface Namespace { */ gfindIndex: typeof gfindIndex; + /** + * Returns the index of the first element in a one-dimensional ndarray which passes a test implemented by a predicate function within a specified range. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a zero-dimensional ndarray containing the index from which to begin searching. + * - a zero-dimensional ndarray containing the index at which to stop searching (exclusive). + * + * - If no element passes a test implemented by a predicate function, the function returns `-1`. + * + * @param arrays - array-like object containing ndarrays + * @param clbk - predicate function + * @param thisArg - predicate function execution context + * @returns index + * + * @example + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * + * function clbk( v ) { + * return v % 2.0 === 0.0; + * } + * + * var x = vector( [ 2.0, 1.0, 3.0, 4.0, 5.0 ], 'generic' ); + * + * var fromIndex = scalar2ndarray( 1, { + * 'dtype': 'generic' + * }); + * + * var toIndex = scalar2ndarray( 4, { + * 'dtype': 'generic' + * }); + * + * var v = ns.gfindIndexBetween( [ x, fromIndex, toIndex ], clbk ); + * // returns 3 + */ + gfindIndexBetween: typeof gfindIndexBetween; + /** * Returns the index of the last element in a one-dimensional ndarray which passes a test implemented by a predicate function. *