From e47c8ce2a8eccbc6f39d3528e7bbfb9629b65a93 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sat, 9 May 2026 21:42:34 -0700 Subject: [PATCH] docs: improve doctests for complex number typed arrays in `ndarray/base/unary-by` --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/ndarray/base/unary-by/lib/0d_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/10d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/10d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/1d_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/2d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/2d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/3d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/3d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/4d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/4d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/5d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/5d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/6d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/6d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/7d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/7d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/8d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/8d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/9d_accessors.js | 9 +-------- .../ndarray/base/unary-by/lib/9d_blocked_accessors.js | 9 +-------- .../@stdlib/ndarray/base/unary-by/lib/main.js | 3 ++- .../@stdlib/ndarray/base/unary-by/lib/nd_accessors.js | 9 +-------- 22 files changed, 23 insertions(+), 169 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/0d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/0d_accessors.js index 67b75e32d498..746b0a9633c1 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/0d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/0d_accessors.js @@ -102,14 +102,7 @@ * * // Apply the unary function: * unary0d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 30.0 -* -* var im = imagf( v ); -* // returns 40.0 +* // ybuf => [ 30.0, 40.0, 0.0, 0.0 ] */ function unary0d( x, y, fcn, clbk, thisArg ) { var ox = x.offset; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_accessors.js index 6da71c559a6a..c15ba4bf810c 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary10d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary10d( x, y, isRowMajor, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_blocked_accessors.js index 293285313f7d..df043be03dc4 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/10d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary10d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/1d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/1d_accessors.js index 914899a23400..ea5c339f9ea2 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/1d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/1d_accessors.js @@ -102,14 +102,7 @@ * * // Apply the unary function: * unary1d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary1d( x, y, fcn, clbk, thisArg ) { var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_accessors.js index 27e703e69e00..e009fa7579f7 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_accessors.js @@ -103,14 +103,7 @@ * * // Apply the unary function: * unary2d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary2d( x, y, isRowMajor, fcn, clbk, thisArg ) { var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_blocked_accessors.js index 06bd00c2432b..244e74a37978 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/2d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary2d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary2d( x, y, fcn, clbk, thisArg ) { var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_accessors.js index 57f78b0e3756..cc6b174756d9 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary3d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary3d( x, y, isRowMajor, fcn, clbk, thisArg ) { var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_blocked_accessors.js index b3329b6c6d96..8f81cfba0d10 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/3d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary3d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary3d( x, y, fcn, clbk, thisArg ) { var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_accessors.js index 5e23f5a6749f..447929e1e00d 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary4d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary4d( x, y, isRowMajor, fcn, clbk, thisArg ) { var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_blocked_accessors.js index dae07e0e368c..eee13cbc5902 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/4d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary4d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary4d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_accessors.js index 81fbf3297c1d..7231b69de185 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary5d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary5d( x, y, isRowMajor, fcn, clbk, thisArg ) { var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_blocked_accessors.js index a3df528268d4..e3017c05b583 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/5d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary5d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary5d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_accessors.js index 613f510a52f5..aca1d0a76b47 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary6d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary6d( x, y, isRowMajor, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_blocked_accessors.js index c372c3210b4d..89a1df25928a 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/6d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary6d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_accessors.js index fb002eb5f4ac..8e3ec869aa7e 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary7d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = real( v ); -* // returns 10.0 -* -* var im = imag( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary7d( x, y, isRowMajor, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_blocked_accessors.js index afbfeae6c68b..bc795694c880 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/7d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary7d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = real( v ); -* // returns 10.0 -* -* var im = imag( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_accessors.js index cffea85c300b..ec14b0fec3a9 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary8d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary8d( x, y, isRowMajor, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_blocked_accessors.js index 5885fbc0adff..4de7b9ae01e3 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/8d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary8d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_accessors.js index 58be66ebd22e..ecd1b3a67db1 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_accessors.js @@ -105,14 +105,7 @@ * * // Apply the unary function: * unary9d( x, y, true, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unary9d( x, y, isRowMajor, fcn, clbk, thisArg ) { // eslint-disable-line max-statements var xbuf; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_blocked_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_blocked_accessors.js index 963e685d4b12..543580d198c0 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_blocked_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/9d_blocked_accessors.js @@ -109,14 +109,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' ); * * // Apply the unary function: * blockedunary9d( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function blockedunary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function var bsize; diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/main.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/main.js index 303ea9a09b86..32a248e8dcc3 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/main.js @@ -20,6 +20,7 @@ // MODULES // +var format = require( '@stdlib/string/format' ); var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' ); var strides2order = require( '@stdlib/ndarray/base/strides2order' ); var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' ); @@ -224,7 +225,7 @@ function unaryBy( arrays, fcn, clbk, thisArg ) { shy = y.shape; ndims = shx.length; if ( ndims !== shy.length ) { - throw new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' ); + throw new Error( format( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == %d. ndims(y) == %d.', ndims, shy.length ) ); } // Determine whether we can avoid iteration altogether... if ( ndims === 0 ) { diff --git a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/nd_accessors.js b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/nd_accessors.js index 02ababbc0dae..b2480be9d924 100644 --- a/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/nd_accessors.js +++ b/lib/node_modules/@stdlib/ndarray/base/unary-by/lib/nd_accessors.js @@ -113,14 +113,7 @@ var MODE = 'throw'; * * // Apply the unary function: * unarynd( x, y, scale, cidentityf ); -* -* var v = y.data.get( 0 ); -* -* var re = realf( v ); -* // returns 10.0 -* -* var im = imagf( v ); -* // returns 20.0 +* // ybuf => [ 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0 ] */ function unarynd( x, y, fcn, clbk, thisArg ) { var xbuf;