Skip to content

Commit 6e4b9eb

Browse files
feat: update namespace TypeScript declarations
PR-URL: #2681 Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent fce4265 commit 6e4b9eb

File tree

3 files changed

+37
-5
lines changed

3 files changed

+37
-5
lines changed

lib/node_modules/@stdlib/lapack/base/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface Namespace {
5656
* var IPIV = new Int32Array( [ 2, 0, 1 ] );
5757
* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
5858
*
59-
* ns.dlaswp.ndarray( 'row-major', 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
59+
* ns.dlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
6060
* // A => <Float64Array>[ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0 ]
6161
*/
6262
dlaswp: typeof dlaswp;

lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,19 +7366,19 @@ interface Namespace {
73667366
*
73677367
* @param x - input value
73687368
* @param n - number of significant figures
7369-
* @param b - integer base (default: 10)
7369+
* @param b - integer base
73707370
* @returns rounded value
73717371
*
73727372
* @example
7373-
* var v = ns.truncsd( 3.141592653589793, 5 );
7373+
* var v = ns.truncsd( 3.141592653589793, 5, 10 );
73747374
* // returns 3.1415
73757375
*
73767376
* @example
7377-
* var v = ns.truncsd( 3.141592653589793, 1 );
7377+
* var v = ns.truncsd( 3.141592653589793, 1, 10 );
73787378
* // returns 3.0
73797379
*
73807380
* @example
7381-
* var v = ns.truncsd( 12368.0, 2 );
7381+
* var v = ns.truncsd( 12368.0, 2, 10 );
73827382
* // returns 12000.0
73837383
*
73847384
* @example

lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import flag = require( '@stdlib/ndarray/base/flag' );
5454
import flags = require( '@stdlib/ndarray/base/flags' );
5555
import fliplr = require( '@stdlib/ndarray/base/fliplr' );
5656
import flipud = require( '@stdlib/ndarray/base/flipud' );
57+
import forEach = require( '@stdlib/ndarray/base/for-each' );
5758
import scalar2ndarray = require( '@stdlib/ndarray/base/from-scalar' );
5859
import ind = require( '@stdlib/ndarray/base/ind' );
5960
import ind2sub = require( '@stdlib/ndarray/base/ind2sub' );
@@ -1044,6 +1045,37 @@ interface Namespace {
10441045
*/
10451046
flipud: typeof flipud;
10461047

1048+
/**
1049+
* Invokes a callback function once for each ndarray element.
1050+
*
1051+
* @param arrays - array-like object containing an output ndarray
1052+
* @param fcn - callback function
1053+
*
1054+
* @example
1055+
* var Float64Array = require( '@stdlib/array/float64' );
1056+
* var naryFunction = require( '@stdlib/utils/nary-function' );
1057+
* var log = require( '@stdlib/console/log' );
1058+
*
1059+
* // Create data buffers:
1060+
* var xbuf = new Float64Array( 12 );
1061+
*
1062+
* // Define the shape of the array:
1063+
* var shape = [ 3, 1, 2 ];
1064+
*
1065+
* // Define the array strides:
1066+
* var sx = [ 4, 4, 1 ];
1067+
*
1068+
* // Define the index offset:
1069+
* var ox = 1;
1070+
*
1071+
* // Create the output ndarray:
1072+
* var x = ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );
1073+
*
1074+
* // Apply the callback function:
1075+
* ns.forEach( [ x ], naryFunction( log, 1 ) );
1076+
*/
1077+
forEach: typeof forEach;
1078+
10471079
/**
10481080
* Returns a zero-dimensional ndarray containing a provided scalar value.
10491081
*

0 commit comments

Comments
 (0)