From 79a71ce3bea1f97d5a2e0fee8c66a1856d408d56 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Wed, 15 Apr 2026 03:14:14 +0000 Subject: [PATCH] feat: update `blas/ext` TypeScript declarations Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> --- .../@stdlib/blas/ext/docs/types/index.d.ts | 104 ++++++++++++++++-- 1 file changed, 93 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/docs/types/index.d.ts index 508c9dd61683..8b96e61c9970 100644 --- a/lib/node_modules/@stdlib/blas/ext/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/docs/types/index.d.ts @@ -21,15 +21,18 @@ /* eslint-disable max-lines */ import base = require( '@stdlib/blas/ext/base' ); +import circshift = require( '@stdlib/blas/ext/circshift' ); import cusum = require( '@stdlib/blas/ext/cusum' ); import findIndex = require( '@stdlib/blas/ext/find-index' ); import findLastIndex = require( '@stdlib/blas/ext/find-last-index' ); import indexOf = require( '@stdlib/blas/ext/index-of' ); +import join = require( '@stdlib/blas/ext/join' ); import lastIndexOf = require( '@stdlib/blas/ext/last-index-of' ); import linspace = require( '@stdlib/blas/ext/linspace' ); import sorthp = require( '@stdlib/blas/ext/sorthp' ); import sum = require( '@stdlib/blas/ext/sum' ); import toSortedhp = require( '@stdlib/blas/ext/to-sortedhp' ); +import zeroTo = require( '@stdlib/blas/ext/zero-to' ); /** * Interface describing the `ext` namespace. @@ -40,6 +43,35 @@ interface Namespace { */ base: typeof base; + /** + * Circularly shifts the elements of an input ndarray by a specified number of positions along one or more ndarray dimensions. + * + * ## Notes + * + * - The input ndarray is shifted **in-place** (i.e., the input ndarray is **mutated**). + * - When shifting elements along a single dimension, a positive `k` shifts elements to the right (toward higher indices), and a negative `k` shifts elements to the left (toward lower indices). If `k` is zero, the input ndarray is left unchanged. + * + * @param x - input ndarray + * @param k - number of positions to shift + * @param options - function options + * @returns input ndarray + * + * @example + * var array = require( '@stdlib/ndarray/array' ); + * + * var x = array( [ 1.0, 2.0, 3.0, 4.0 ], { + * 'shape': [ 2, 2 ], + * 'order': 'row-major' + * }); + * // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] + * + * var y = ns.circshift( x, 1, { + * 'dims': [ 0 ] + * }); + * // returns [ [ 3.0, 4.0 ], [ 1.0, 2.0 ] ] + */ + circshift: typeof circshift; + /** * Computes the cumulative sum along one or more ndarray dimensions. * @@ -215,6 +247,40 @@ interface Namespace { */ indexOf: typeof indexOf; + /** + * Returns an ndarray created by joining elements using a separator along one or more ndarray dimensions. + * + * @param x - input ndarray + * @param options - function options + * @returns output ndarray + * + * @example + * var array = require( '@stdlib/ndarray/array' ); + * + * var x = array( [ 1.0, 2.0, 3.0 ] ); + * + * var y = ns.join( x ); + * // returns [ '1,2,3' ] + * + * @example + * var empty = require( '@stdlib/ndarray/empty' ); + * var array = require( '@stdlib/ndarray/array' ); + * + * var x = array( [ 1.0, 2.0, 3.0 ], { + * 'dtype': 'generic' + * }); + * var y = empty( [], { + * 'dtype': 'generic' + * }); + * + * var out = ns.join.assign( x, y ); + * // returns [ '1,2,3' ] + * + * var bool = ( out === y ); + * // returns true + */ + join: typeof join; + /** * Returns the last index of a specified search element along an ndarray dimension. * @@ -270,29 +336,20 @@ interface Namespace { * @param options - function options * * @example - * var ndarray2array = require( '@stdlib/ndarray/to-array' ); - * * var out = ns.linspace( [ 2, 4 ], 0.0, 3.0 ); - * // returns - * - * var arr = ndarray2array( out ); - * // returns [ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ] + * // returns [ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ] * * @example * var zeros = require( '@stdlib/ndarray/zeros' ); - * var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var x = zeros( [ 2, 4 ] ); * // returns * * var out = ns.linspace.assign( x, 0.0, 3.0 ); - * // returns + * // returns [ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ] * * var bool = ( out === x ); * // returns true - * - * var arr = ndarray2array( out ); - * // returns [ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ] */ linspace: typeof linspace; @@ -422,6 +479,31 @@ interface Namespace { * // returns true */ toSortedhp: typeof toSortedhp; + + /** + * Returns a new ndarray filled with linearly spaced numeric elements which increment by 1 starting from zero along one or more ndarray dimensions. + * + * @param shape - array shape + * @param options - function options + * @returns output ndarray + * + * @example + * var out = ns.zeroTo( [ 2, 3 ] ); + * // returns [ [ 0.0, 1.0, 2.0 ], [ 0.0, 1.0, 2.0 ] ] + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = zeros( [ 2, 3 ] ); + * // returns [ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ] ] + * + * var out = ns.zeroTo.assign( x ); + * // returns [ [ 0.0, 1.0, 2.0 ], [ 0.0, 1.0, 2.0 ] ] + * + * var bool = ( out === x ); + * // returns true + */ + zeroTo: typeof zeroTo; } /**