From 35decf2877821ccbb190b28c35b719c7b62b142d Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Thu, 15 Oct 2026 02:23:15 +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 | 740 +++++++++++++++++- 1 file changed, 737 insertions(+), 3 deletions(-) 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 29f648787360..bfdc4ca3a811 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 @@ -40,7 +40,10 @@ import cunitspace = require( '@stdlib/blas/ext/base/ndarray/cunitspace' ); import cwapx = require( '@stdlib/blas/ext/base/ndarray/cwapx' ); import cwax = require( '@stdlib/blas/ext/base/ndarray/cwax' ); import cwhere = require( '@stdlib/blas/ext/base/ndarray/cwhere' ); +import cwxmy = require( '@stdlib/blas/ext/base/ndarray/cwxmy' ); +import cwxpy = require( '@stdlib/blas/ext/base/ndarray/cwxpy' ); import cwxsa = require( '@stdlib/blas/ext/base/ndarray/cwxsa' ); +import cwxsy = require( '@stdlib/blas/ext/base/ndarray/cwxsy' ); import cxdy = require( '@stdlib/blas/ext/base/ndarray/cxdy' ); import cxmy = require( '@stdlib/blas/ext/base/ndarray/cxmy' ); import cxpy = require( '@stdlib/blas/ext/base/ndarray/cxpy' ); @@ -52,6 +55,7 @@ import daxpb = require( '@stdlib/blas/ext/base/ndarray/daxpb' ); import daxpby = require( '@stdlib/blas/ext/base/ndarray/daxpby' ); import dcartesianPower = require( '@stdlib/blas/ext/base/ndarray/dcartesian-power' ); import dcartesianProduct = require( '@stdlib/blas/ext/base/ndarray/dcartesian-product' ); +import dcartesianSquare = require( '@stdlib/blas/ext/base/ndarray/dcartesian-square' ); import dcircshift = require( '@stdlib/blas/ext/base/ndarray/dcircshift' ); import dcopyWithin = require( '@stdlib/blas/ext/base/ndarray/dcopy-within' ); import dcuany = require( '@stdlib/blas/ext/base/ndarray/dcuany' ); @@ -64,6 +68,7 @@ import dcusumkbn2 = require( '@stdlib/blas/ext/base/ndarray/dcusumkbn2' ); import dcusumors = require( '@stdlib/blas/ext/base/ndarray/dcusumors' ); import dcusumpw = require( '@stdlib/blas/ext/base/ndarray/dcusumpw' ); import ddiff = require( '@stdlib/blas/ext/base/ndarray/ddiff' ); +import dediff = require( '@stdlib/blas/ext/base/ndarray/dediff' ); import dfill = require( '@stdlib/blas/ext/base/ndarray/dfill' ); import dfillEqual = require( '@stdlib/blas/ext/base/ndarray/dfill-equal' ); import dfillLessThan = require( '@stdlib/blas/ext/base/ndarray/dfill-less-than' ); @@ -74,12 +79,14 @@ import dfirstIndexGreaterThan = require( '@stdlib/blas/ext/base/ndarray/dfirst-i import dfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/dfirst-index-less-than' ); import dindexOf = require( '@stdlib/blas/ext/base/ndarray/dindex-of' ); import dindexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/dindex-of-falsy' ); +import dindexOfLessThanEqual = require( '@stdlib/blas/ext/base/ndarray/dindex-of-less-than-equal' ); import dindexOfNotEqual = require( '@stdlib/blas/ext/base/ndarray/dindex-of-not-equal' ); import dindexOfTruthy = require( '@stdlib/blas/ext/base/ndarray/dindex-of-truthy' ); import dlastIndexEqual = require( '@stdlib/blas/ext/base/ndarray/dlast-index-equal' ); import dlastIndexOf = require( '@stdlib/blas/ext/base/ndarray/dlast-index-of' ); import dlastIndexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/dlast-index-of-falsy' ); import dlastIndexOfTruthy = require( '@stdlib/blas/ext/base/ndarray/dlast-index-of-truthy' ); +import dleftPadCircular = require( '@stdlib/blas/ext/base/ndarray/dleft-pad-circular' ); import dleftPadEdge = require( '@stdlib/blas/ext/base/ndarray/dleft-pad-edge' ); import dlinspace = require( '@stdlib/blas/ext/base/ndarray/dlinspace' ); import dlogspace = require( '@stdlib/blas/ext/base/ndarray/dlogspace' ); @@ -109,6 +116,8 @@ import dvander = require( '@stdlib/blas/ext/base/ndarray/dvander' ); import dwapx = require( '@stdlib/blas/ext/base/ndarray/dwapx' ); import dwax = require( '@stdlib/blas/ext/base/ndarray/dwax' ); import dwhere = require( '@stdlib/blas/ext/base/ndarray/dwhere' ); +import dwxdy = require( '@stdlib/blas/ext/base/ndarray/dwxdy' ); +import dwxmy = require( '@stdlib/blas/ext/base/ndarray/dwxmy' ); import dwxpy = require( '@stdlib/blas/ext/base/ndarray/dwxpy' ); import dwxsa = require( '@stdlib/blas/ext/base/ndarray/dwxsa' ); import dwxsy = require( '@stdlib/blas/ext/base/ndarray/dwxsy' ); @@ -121,6 +130,7 @@ import dzeroTo = require( '@stdlib/blas/ext/base/ndarray/dzero-to' ); import gany = require( '@stdlib/blas/ext/base/ndarray/gany' ); import gaxpb = require( '@stdlib/blas/ext/base/ndarray/gaxpb' ); import gaxpby = require( '@stdlib/blas/ext/base/ndarray/gaxpby' ); +import gcartesianPower = require( '@stdlib/blas/ext/base/ndarray/gcartesian-power' ); import gcircshift = require( '@stdlib/blas/ext/base/ndarray/gcircshift' ); import gcopyWithin = require( '@stdlib/blas/ext/base/ndarray/gcopy-within' ); import gcuany = require( '@stdlib/blas/ext/base/ndarray/gcuany' ); @@ -133,6 +143,7 @@ import gcusumkbn2 = require( '@stdlib/blas/ext/base/ndarray/gcusumkbn2' ); import gcusumors = require( '@stdlib/blas/ext/base/ndarray/gcusumors' ); import gcusumpw = require( '@stdlib/blas/ext/base/ndarray/gcusumpw' ); import gdiff = require( '@stdlib/blas/ext/base/ndarray/gdiff' ); +import gediff = require( '@stdlib/blas/ext/base/ndarray/gediff' ); import gfill = require( '@stdlib/blas/ext/base/ndarray/gfill' ); import gfillBy = require( '@stdlib/blas/ext/base/ndarray/gfill-by' ); import gfillEqual = require( '@stdlib/blas/ext/base/ndarray/gfill-equal' ); @@ -144,6 +155,7 @@ 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 gfindLastIndexBetween = require( '@stdlib/blas/ext/base/ndarray/gfind-last-index-between' ); import gfirstIndexEqual = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-equal' ); import gfirstIndexGreaterThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-greater-than' ); import gfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-less-than' ); @@ -205,6 +217,7 @@ import gzeroTo = require( '@stdlib/blas/ext/base/ndarray/gzero-to' ); import sany = require( '@stdlib/blas/ext/base/ndarray/sany' ); import saxpb = require( '@stdlib/blas/ext/base/ndarray/saxpb' ); import saxpby = require( '@stdlib/blas/ext/base/ndarray/saxpby' ); +import scartesianPower = require( '@stdlib/blas/ext/base/ndarray/scartesian-power' ); import scircshift = require( '@stdlib/blas/ext/base/ndarray/scircshift' ); import scopyWithin = require( '@stdlib/blas/ext/base/ndarray/scopy-within' ); import scuany = require( '@stdlib/blas/ext/base/ndarray/scuany' ); @@ -216,6 +229,7 @@ import scusumkbn = require( '@stdlib/blas/ext/base/ndarray/scusumkbn' ); import scusumkbn2 = require( '@stdlib/blas/ext/base/ndarray/scusumkbn2' ); import scusumors = require( '@stdlib/blas/ext/base/ndarray/scusumors' ); import sdiff = require( '@stdlib/blas/ext/base/ndarray/sdiff' ); +import sediff = require( '@stdlib/blas/ext/base/ndarray/sediff' ); import sfill = require( '@stdlib/blas/ext/base/ndarray/sfill' ); import sfillEqual = require( '@stdlib/blas/ext/base/ndarray/sfill-equal' ); import sfillNaN = require( '@stdlib/blas/ext/base/ndarray/sfill-nan' ); @@ -224,12 +238,14 @@ import sfirstIndexEqual = require( '@stdlib/blas/ext/base/ndarray/sfirst-index-e import sfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/sfirst-index-less-than' ); import sindexOf = require( '@stdlib/blas/ext/base/ndarray/sindex-of' ); import sindexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/sindex-of-falsy' ); +import sindexOfLessThanEqual = require( '@stdlib/blas/ext/base/ndarray/sindex-of-less-than-equal' ); import sindexOfNotEqual = require( '@stdlib/blas/ext/base/ndarray/sindex-of-not-equal' ); import sindexOfTruthy = require( '@stdlib/blas/ext/base/ndarray/sindex-of-truthy' ); import slastIndexEqual = require( '@stdlib/blas/ext/base/ndarray/slast-index-equal' ); import slastIndexOf = require( '@stdlib/blas/ext/base/ndarray/slast-index-of' ); import slastIndexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/slast-index-of-falsy' ); import slastIndexOfTruthy = require( '@stdlib/blas/ext/base/ndarray/slast-index-of-truthy' ); +import sleftPadCircular = require( '@stdlib/blas/ext/base/ndarray/sleft-pad-circular' ); import slinspace = require( '@stdlib/blas/ext/base/ndarray/slinspace' ); import slogspace = require( '@stdlib/blas/ext/base/ndarray/slogspace' ); import snansum = require( '@stdlib/blas/ext/base/ndarray/snansum' ); @@ -239,6 +255,7 @@ import snansumors = require( '@stdlib/blas/ext/base/ndarray/snansumors' ); import snansumpw = require( '@stdlib/blas/ext/base/ndarray/snansumpw' ); import snone = require( '@stdlib/blas/ext/base/ndarray/snone' ); import soneTo = require( '@stdlib/blas/ext/base/ndarray/sone-to' ); +import srightPadCircular = require( '@stdlib/blas/ext/base/ndarray/sright-pad-circular' ); import ssome = require( '@stdlib/blas/ext/base/ndarray/ssome' ); import ssort = require( '@stdlib/blas/ext/base/ndarray/ssort' ); import ssorthp = require( '@stdlib/blas/ext/base/ndarray/ssorthp' ); @@ -256,6 +273,8 @@ import svander = require( '@stdlib/blas/ext/base/ndarray/svander' ); import swapx = require( '@stdlib/blas/ext/base/ndarray/swapx' ); import swax = require( '@stdlib/blas/ext/base/ndarray/swax' ); import swhere = require( '@stdlib/blas/ext/base/ndarray/swhere' ); +import swxdy = require( '@stdlib/blas/ext/base/ndarray/swxdy' ); +import swxmy = require( '@stdlib/blas/ext/base/ndarray/swxmy' ); import swxpy = require( '@stdlib/blas/ext/base/ndarray/swxpy' ); import swxsa = require( '@stdlib/blas/ext/base/ndarray/swxsa' ); import swxsy = require( '@stdlib/blas/ext/base/ndarray/swxsy' ); @@ -265,6 +284,7 @@ import sxpy = require( '@stdlib/blas/ext/base/ndarray/sxpy' ); import sxsa = require( '@stdlib/blas/ext/base/ndarray/sxsa' ); import sxsy = require( '@stdlib/blas/ext/base/ndarray/sxsy' ); import szeroTo = require( '@stdlib/blas/ext/base/ndarray/szero-to' ); +import zany = require( '@stdlib/blas/ext/base/ndarray/zany' ); import zaxpb = require( '@stdlib/blas/ext/base/ndarray/zaxpb' ); import zaxpby = require( '@stdlib/blas/ext/base/ndarray/zaxpby' ); import zcopyWithin = require( '@stdlib/blas/ext/base/ndarray/zcopy-within' ); @@ -273,6 +293,7 @@ import zfill = require( '@stdlib/blas/ext/base/ndarray/zfill' ); import zindexOf = require( '@stdlib/blas/ext/base/ndarray/zindex-of' ); import zindexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/zindex-of-falsy' ); import zindexOfTruthy = require( '@stdlib/blas/ext/base/ndarray/zindex-of-truthy' ); +import zlastIndexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/zlast-index-of-falsy' ); import zlogspace = require( '@stdlib/blas/ext/base/ndarray/zlogspace' ); import zoneTo = require( '@stdlib/blas/ext/base/ndarray/zone-to' ); import zsum = require( '@stdlib/blas/ext/base/ndarray/zsum' ); @@ -283,7 +304,10 @@ import zunitspace = require( '@stdlib/blas/ext/base/ndarray/zunitspace' ); import zwapx = require( '@stdlib/blas/ext/base/ndarray/zwapx' ); import zwax = require( '@stdlib/blas/ext/base/ndarray/zwax' ); import zwhere = require( '@stdlib/blas/ext/base/ndarray/zwhere' ); +import zwxmy = require( '@stdlib/blas/ext/base/ndarray/zwxmy' ); +import zwxpy = require( '@stdlib/blas/ext/base/ndarray/zwxpy' ); import zwxsa = require( '@stdlib/blas/ext/base/ndarray/zwxsa' ); +import zwxsy = require( '@stdlib/blas/ext/base/ndarray/zwxsy' ); import zxdy = require( '@stdlib/blas/ext/base/ndarray/zxdy' ); import zxmy = require( '@stdlib/blas/ext/base/ndarray/zxmy' ); import zxpy = require( '@stdlib/blas/ext/base/ndarray/zxpy' ); @@ -947,6 +971,58 @@ interface Namespace { */ cwhere: typeof cwhere; + /** + * Multiplies elements of a one-dimensional single-precision complex floating-point ndarray by the corresponding elements of a second one-dimensional single-precision complex floating-point ndarray and assigns the results to elements in a third one-dimensional single-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Complex64Vector = require( '@stdlib/ndarray/vector/complex64' ); + * + * var x = new Complex64Vector( [ 1.0, 2.0, 3.0, -1.0, 0.0, 1.0 ] ); + * var y = new Complex64Vector( [ 2.0, 1.0, -1.0, 3.0, 4.0, 0.0 ] ); + * var w = new Complex64Vector( 3 ); + * + * var out = ns.cwxmy( [ x, y, w ] ); + * // returns [ [ 0.0, 5.0 ], [ 0.0, 10.0 ], [ 0.0, 4.0 ] ] + */ + cwxmy: typeof cwxmy; + + /** + * Adds elements of a one-dimensional single-precision complex floating-point ndarray to the corresponding elements of a second one-dimensional single-precision complex floating-point ndarray and assigns the results to elements in a third one-dimensional single-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Complex64Vector = require( '@stdlib/ndarray/vector/complex64' ); + * + * var x = new Complex64Vector( [ 1.0, 2.0, 3.0, -1.0, 0.0, 1.0 ] ); + * var y = new Complex64Vector( [ 2.0, 1.0, -1.0, 3.0, 4.0, 0.0 ] ); + * var w = new Complex64Vector( 3 ); + * + * var out = ns.cwxpy( [ x, y, w ] ); + * // returns [ [ 3.0, 3.0 ], [ 2.0, 2.0 ], [ 4.0, 1.0 ] ] + */ + cwxpy: typeof cwxpy; + /** * Subtracts a scalar constant from each element in an input one-dimensional single-precision complex floating-point ndarray and assigns the results to elements in a one-dimensional single-precision complex floating-point output ndarray. * @@ -978,6 +1054,32 @@ interface Namespace { */ cwxsa: typeof cwxsa; + /** + * Subtracts elements of a second one-dimensional single-precision complex floating-point ndarray from the corresponding elements of a first one-dimensional single-precision complex floating-point ndarray and assigns the results to elements in a third one-dimensional single-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Complex64Vector = require( '@stdlib/ndarray/vector/complex64' ); + * + * var x = new Complex64Vector( [ 1.0, 2.0, 3.0, -1.0, 0.0, 1.0 ] ); + * var y = new Complex64Vector( [ 2.0, 1.0, -1.0, 3.0, 4.0, 0.0 ] ); + * var w = new Complex64Vector( 3 ); + * + * var out = ns.cwxsy( [ x, y, w ] ); + * // returns [ [ -1.0, 1.0 ], [ 4.0, -4.0 ], [ -4.0, 1.0 ] ] + */ + cwxsy: typeof cwxsy; + /** * Divides elements of a one-dimensional single-precision complex floating-point ndarray by the corresponding elements of a second one-dimensional single-precision complex floating-point ndarray and assigns the results to the second ndarray. * @@ -1218,7 +1320,7 @@ interface Namespace { daxpby: typeof daxpby; /** - * Computes the Cartesian power for a double-precision floating-point ndarray. + * Computes the Cartesian power for a one-dimensional double-precision floating-point ndarray. * * ## Notes * @@ -1254,7 +1356,7 @@ interface Namespace { dcartesianPower: typeof dcartesianPower; /** - * Computes the Cartesian product for two double-precision floating-point ndarrays. + * Computes the Cartesian product for two one-dimensional double-precision floating-point ndarrays. * * ## Notes * @@ -1285,6 +1387,36 @@ interface Namespace { */ dcartesianProduct: typeof dcartesianProduct; + /** + * Computes the Cartesian square for a one-dimensional double-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a two-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = new Float64Vector( [ 1.0, 2.0 ] ); + * var out = zeros( [ 4, 2 ], { + * 'dtype': 'float64' + * }); + * + * var v = ns.dcartesianSquare( [ x, out ] ); + * // returns [ [ 1.0, 1.0 ], [ 1.0, 2.0 ], [ 2.0, 1.0 ], [ 2.0, 2.0 ] ] + * + * var bool = ( v === out ); + * // returns true + */ + dcartesianSquare: typeof dcartesianSquare; + /** * Circularly shifts the elements of a one-dimensional double-precision floating-point ndarray by a specified number of positions. * @@ -1674,6 +1806,34 @@ interface Namespace { */ ddiff: typeof ddiff; + /** + * Calculates the differences between consecutive elements of a one-dimensional double-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional ndarray containing values to prepend. + * - a one-dimensional ndarray containing values to append. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * + * var x = new Float64Vector( [ 2.0, 4.0, 6.0, 8.0, 10.0 ] ); + * var prepend = new Float64Vector( [ 1.0 ] ); + * var append = new Float64Vector( [ 11.0 ] ); + * var out = new Float64Vector( 6 ); + * + * var y = ns.dediff( [ x, prepend, append, out ] ); + * // returns [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ] + */ + dediff: typeof dediff; + /** * Fills a one-dimensional double-precision floating-point ndarray with a specified scalar constant. * @@ -2042,6 +2202,41 @@ interface Namespace { */ dindexOfFalsy: typeof dindexOfFalsy; + /** + * Returns the first index of an element in a one-dimensional double-precision floating-point ndarray which is less than or equal to a specified search element. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a zero-dimensional ndarray containing the search element. + * - a zero-dimensional ndarray containing the index from which to begin searching. + * + * - When comparing elements, the function uses the less-than-or-equal operator `<=`. As a consequence, comparisons involving `NaN` always evaluate to `false`, and `-0` and `+0` are considered the same. + * + * @param arrays - array-like object containing ndarrays + * @returns index + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = new Float64Vector( [ 3.0, 4.0, 1.0, 2.0 ] ); + * + * var searchElement = scalar2ndarray( 2.0, { + * 'dtype': 'float64' + * }); + * + * var fromIndex = scalar2ndarray( 0, { + * 'dtype': 'generic' + * }); + * + * var v = ns.dindexOfLessThanEqual( [ x, searchElement, fromIndex ] ); + * // returns 2 + */ + dindexOfLessThanEqual: typeof dindexOfLessThanEqual; + /** * Returns the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element. * @@ -2224,6 +2419,39 @@ interface Namespace { */ dlastIndexOfTruthy: typeof dlastIndexOfTruthy; + /** + * Prepends elements to a one-dimensional double-precision floating-point input ndarray by circularly repeating existing elements and writes the results to a one-dimensional double-precision floating-point output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = new Float64Vector( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = zeros( [ 10 ], { + * 'dtype': 'float64' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.dleftPadCircular( [ x, y, k ] ); + * // returns [ 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 ] + */ + dleftPadCircular: typeof dleftPadCircular; + /** * Prepends elements to a one-dimensional double-precision floating-point input ndarray by repeating the leading edge element and writes the results to a one-dimensional double-precision floating-point output ndarray. * @@ -3036,6 +3264,58 @@ interface Namespace { */ dwhere: typeof dwhere; + /** + * Divides elements of a one-dimensional double-precision floating-point ndarray by the corresponding elements of a second one-dimensional double-precision floating-point ndarray and assigns the results to elements in a third one-dimensional double-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * + * var x = new Float64Vector( [ 4.0, 6.0, 12.0, 20.0, 30.0 ] ); + * var y = new Float64Vector( [ 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var w = new Float64Vector( 5 ); + * + * var out = ns.dwxdy( [ x, y, w ] ); + * // returns [ 2.0, 2.0, 3.0, 4.0, 5.0 ] + */ + dwxdy: typeof dwxdy; + + /** + * Multiplies elements of a one-dimensional double-precision floating-point ndarray by the corresponding elements of a second one-dimensional double-precision floating-point ndarray and assigns the results to elements in a third one-dimensional double-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * + * var x = new Float64Vector( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + * var y = new Float64Vector( [ 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var w = new Float64Vector( 5 ); + * + * var out = ns.dwxmy( [ x, y, w ] ); + * // returns [ 2.0, 6.0, 12.0, 20.0, 30.0 ] + */ + dwxmy: typeof dwxmy; + /** * Adds elements of a one-dimensional double-precision floating-point ndarray to the corresponding elements of a second one-dimensional double-precision floating-point ndarray and assigns the results to elements in a third one-dimensional double-precision floating-point ndarray. * @@ -3357,6 +3637,42 @@ interface Namespace { */ gaxpby: typeof gaxpby; + /** + * Computes the Cartesian power for a one-dimensional ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a two-dimensional output ndarray. + * - a zero-dimensional ndarray specifying the power. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = vector( [ 1.0, 2.0 ], 'generic' ); + * var out = zeros( [ 4, 2 ], { + * 'dtype': 'generic' + * }); + * + * var k = scalar2ndarray( 2, { + * 'dtype': 'generic' + * }); + * + * var v = ns.gcartesianPower( [ x, out, k ] ); + * // returns [ [ 1.0, 1.0 ], [ 1.0, 2.0 ], [ 2.0, 1.0 ], [ 2.0, 2.0 ] ] + * + * var bool = ( v === out ); + * // returns true + */ + gcartesianPower: typeof gcartesianPower; + /** * Circularly shifts the elements of a one-dimensional ndarray by a specified number of positions. * @@ -3740,7 +4056,35 @@ interface Namespace { gdiff: typeof gdiff; /** - * Fills a one-dimensional ndarray with a specified scalar constant. + * Calculates the differences between consecutive elements of a one-dimensional ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional ndarray containing values to prepend. + * - a one-dimensional ndarray containing values to append. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * + * var x = vector( [ 2.0, 4.0, 6.0, 8.0, 10.0 ], 'generic' ); + * var prepend = vector( [ 1.0 ], 'generic' ); + * var append = vector( [ 11.0 ], 'generic' ); + * var out = vector( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], 'generic' ); + * + * var y = ns.gediff( [ x, prepend, append, out ] ); + * // returns [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ] + */ + gediff: typeof gediff; + + /** + * Fills a one-dimensional ndarray with a specified scalar constant. * * ## Notes * @@ -4192,6 +4536,47 @@ interface Namespace { */ gfindLastIndex: typeof gfindLastIndex; + /** + * Returns the index of the last 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( 4, { + * 'dtype': 'generic' + * }); + * + * var toIndex = scalar2ndarray( 1, { + * 'dtype': 'generic' + * }); + * + * var v = ns.gfindLastIndexBetween( [ x, fromIndex, toIndex ], clbk ); + * // returns 3 + */ + gfindLastIndexBetween: typeof gfindLastIndexBetween; + /** * Returns the index of the first element in a one-dimensional ndarray equal to a corresponding element in another one-dimensional ndarray. * @@ -5958,6 +6343,42 @@ interface Namespace { */ saxpby: typeof saxpby; + /** + * Computes the Cartesian power for a one-dimensional single-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a two-dimensional output ndarray. + * - a zero-dimensional ndarray specifying the power. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = new Float32Vector( [ 1.0, 2.0 ] ); + * var out = zeros( [ 4, 2 ], { + * 'dtype': 'float32' + * }); + * + * var k = scalar2ndarray( 2, { + * 'dtype': 'generic' + * }); + * + * var v = ns.scartesianPower( [ x, out, k ] ); + * // returns [ [ 1.0, 1.0 ], [ 1.0, 2.0 ], [ 2.0, 1.0 ], [ 2.0, 2.0 ] ] + * + * var bool = ( v === out ); + * // returns true + */ + scartesianPower: typeof scartesianPower; + /** * Circularly shifts the elements of a one-dimensional single-precision floating-point ndarray by a specified number of positions. * @@ -6314,6 +6735,34 @@ interface Namespace { */ sdiff: typeof sdiff; + /** + * Calculates the differences between consecutive elements of a one-dimensional single-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional ndarray containing values to prepend. + * - a one-dimensional ndarray containing values to append. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * + * var x = new Float32Vector( [ 2.0, 4.0, 6.0, 8.0, 10.0 ] ); + * var prepend = new Float32Vector( [ 1.0 ] ); + * var append = new Float32Vector( [ 11.0 ] ); + * var out = new Float32Vector( 6 ); + * + * var y = ns.sediff( [ x, prepend, append, out ] ); + * // returns [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ] + */ + sediff: typeof sediff; + /** * Fills a one-dimensional single-precision floating-point ndarray with a specified scalar constant. * @@ -6605,6 +7054,41 @@ interface Namespace { */ sindexOfFalsy: typeof sindexOfFalsy; + /** + * Returns the first index of an element in a one-dimensional single-precision floating-point ndarray which is less than or equal to a specified search element. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a zero-dimensional ndarray containing the search element. + * - a zero-dimensional ndarray containing the index from which to begin searching. + * + * - When comparing elements, the function uses the less-than-or-equal operator `<=`. As a consequence, comparisons involving `NaN` always evaluate to `false`, and `-0` and `+0` are considered the same. + * + * @param arrays - array-like object containing ndarrays + * @returns index + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = new Float32Vector( [ 3.0, 4.0, 1.0, 2.0 ] ); + * + * var searchElement = scalar2ndarray( 2.0, { + * 'dtype': 'float32' + * }); + * + * var fromIndex = scalar2ndarray( 0, { + * 'dtype': 'generic' + * }); + * + * var v = ns.sindexOfLessThanEqual( [ x, searchElement, fromIndex ] ); + * // returns 2 + */ + sindexOfLessThanEqual: typeof sindexOfLessThanEqual; + /** * Returns the first index of an element in a one-dimensional single-precision floating-point ndarray which is not equal to a specified search element. * @@ -6787,6 +7271,39 @@ interface Namespace { */ slastIndexOfTruthy: typeof slastIndexOfTruthy; + /** + * Prepends elements to a one-dimensional single-precision floating-point input ndarray by circularly repeating existing elements and writes the results to a one-dimensional single-precision floating-point output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = new Float32Vector( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = zeros( [ 10 ], { + * 'dtype': 'float32' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.sleftPadCircular( [ x, y, k ] ); + * // returns [ 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 ] + */ + sleftPadCircular: typeof sleftPadCircular; + /** * Fills a one-dimensional single-precision floating-point ndarray with linearly spaced values over a specified interval. * @@ -7025,6 +7542,39 @@ interface Namespace { */ soneTo: typeof soneTo; + /** + * Appends elements to a one-dimensional single-precision floating-point input ndarray by circularly repeating existing elements and writes the results to a one-dimensional single-precision floating-point output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = new Float32Vector( [ 1.0, 2.0, 3.0, 4.0 ] ); + * var y = zeros( [ 10 ], { + * 'dtype': 'float32' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.srightPadCircular( [ x, y, k ] ); + * // returns [ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0 ] + */ + srightPadCircular: typeof srightPadCircular; + /** * Tests whether a one-dimensional single-precision floating-point ndarray contains at least `k` truthy elements. * @@ -7514,6 +8064,58 @@ interface Namespace { */ swhere: typeof swhere; + /** + * Divides elements of a one-dimensional single-precision floating-point ndarray by the corresponding elements of a second one-dimensional single-precision floating-point ndarray and assigns the results to elements in a third one-dimensional single-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * + * var x = new Float32Vector( [ 4.0, 6.0, 12.0, 20.0, 30.0 ] ); + * var y = new Float32Vector( [ 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var w = new Float32Vector( 5 ); + * + * var out = ns.swxdy( [ x, y, w ] ); + * // returns [ 2.0, 2.0, 3.0, 4.0, 5.0 ] + */ + swxdy: typeof swxdy; + + /** + * Multiplies elements of a one-dimensional single-precision floating-point ndarray by the corresponding elements of a second one-dimensional single-precision floating-point ndarray and assigns the results to elements in a third one-dimensional single-precision floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float32Vector = require( '@stdlib/ndarray/vector/float32' ); + * + * var x = new Float32Vector( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + * var y = new Float32Vector( [ 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var w = new Float32Vector( 5 ); + * + * var out = ns.swxmy( [ x, y, w ] ); + * // returns [ 2.0, 6.0, 12.0, 20.0, 30.0 ] + */ + swxmy: typeof swxmy; + /** * Adds elements of a one-dimensional single-precision floating-point ndarray to the corresponding elements of a second one-dimensional single-precision floating-point ndarray and assigns the results to elements in a third one-dimensional single-precision floating-point ndarray. * @@ -7743,6 +8345,32 @@ interface Namespace { */ szeroTo: typeof szeroTo; + /** + * Tests whether at least one element in a one-dimensional double-precision complex floating-point ndarray is truthy. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * + * - A complex number is truthy when at least one of its real or imaginary components is truthy. + * + * - The function explicitly treats `NaN` values as falsy. + * + * @param arrays - array-like object containing ndarrays + * @returns boolean indicating whether at least one element is truthy + * + * @example + * var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); + * + * var x = new Complex128Vector( [ 0.0, 0.0, 1.0, 2.0 ] ); + * + * var v = ns.zany( [ x ] ); + * // returns true + */ + zany: typeof zany; + /** * Multiplies each element in a one-dimensional double-precision complex floating-point ndarray by a scalar constant and adds a scalar constant to each result. * @@ -8020,6 +8648,34 @@ interface Namespace { */ zindexOfTruthy: typeof zindexOfTruthy; + /** + * Returns the index of the last falsy element in a one-dimensional double-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a zero-dimensional ndarray containing the index from which to begin searching. + * + * @param arrays - array-like object containing ndarrays + * @returns index + * + * @example + * var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = new Complex128Vector( [ 1.0, 2.0, 0.0, 0.0, 3.0, 4.0, 0.0, 0.0 ] ); + * + * var fromIndex = scalar2ndarray( 3, { + * 'dtype': 'generic' + * }); + * + * var v = ns.zlastIndexOfFalsy( [ x, fromIndex ] ); + * // returns 3 + */ + zlastIndexOfFalsy: typeof zlastIndexOfFalsy; + /** * Fills a one-dimensional double-precision complex floating-point ndarray with logarithmically spaced values over a specified interval. * @@ -8316,6 +8972,58 @@ interface Namespace { */ zwhere: typeof zwhere; + /** + * Multiplies elements of a one-dimensional double-precision complex floating-point ndarray by the corresponding elements of a second one-dimensional double-precision complex floating-point ndarray and assigns the results to elements in a third one-dimensional double-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); + * + * var x = new Complex128Vector( [ 1.0, 2.0, 3.0, -1.0, 0.0, 1.0 ] ); + * var y = new Complex128Vector( [ 2.0, 1.0, -1.0, 3.0, 4.0, 0.0 ] ); + * var w = new Complex128Vector( 3 ); + * + * var out = ns.zwxmy( [ x, y, w ] ); + * // returns [ [ 0.0, 5.0 ], [ 0.0, 10.0 ], [ 0.0, 4.0 ] ] + */ + zwxmy: typeof zwxmy; + + /** + * Adds elements of a one-dimensional double-precision complex floating-point ndarray to the corresponding elements of a second one-dimensional double-precision complex floating-point ndarray and assigns the results to elements in a third one-dimensional double-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); + * + * var x = new Complex128Vector( [ 1.0, 2.0, 3.0, -1.0, 0.0, 1.0 ] ); + * var y = new Complex128Vector( [ 2.0, 1.0, -1.0, 3.0, 4.0, 0.0 ] ); + * var w = new Complex128Vector( 3 ); + * + * var out = ns.zwxpy( [ x, y, w ] ); + * // returns [ [ 3.0, 3.0 ], [ 2.0, 2.0 ], [ 4.0, 1.0 ] ] + */ + zwxpy: typeof zwxpy; + /** * Subtracts a scalar constant from each element in an input one-dimensional double-precision complex floating-point ndarray and assigns the results to elements in a one-dimensional double-precision complex floating-point output ndarray. * @@ -8347,6 +9055,32 @@ interface Namespace { */ zwxsa: typeof zwxsa; + /** + * Subtracts elements of a second one-dimensional double-precision complex floating-point ndarray from the corresponding elements of a first one-dimensional double-precision complex floating-point ndarray and assigns the results to elements in a third one-dimensional double-precision complex floating-point ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' ); + * + * var x = new Complex128Vector( [ 1.0, 2.0, 3.0, -1.0, 0.0, 1.0 ] ); + * var y = new Complex128Vector( [ 2.0, 1.0, -1.0, 3.0, 4.0, 0.0 ] ); + * var w = new Complex128Vector( 3 ); + * + * var out = ns.zwxsy( [ x, y, w ] ); + * // returns [ [ -1.0, 1.0 ], [ 4.0, -4.0 ], [ -4.0, 1.0 ] ] + */ + zwxsy: typeof zwxsy; + /** * Divides elements of a one-dimensional double-precision complex floating-point ndarray by the corresponding elements of a second one-dimensional double-precision complex floating-point ndarray and assigns the results to the second ndarray. *