From c1d2691d93d33f2b056411ec5de0eeeb475fd343 Mon Sep 17 00:00:00 2001 From: Mandeep2333 Date: Tue, 10 Mar 2026 11:12:04 +0530 Subject: [PATCH 1/2] docs: simplify examples and fix require path in nanrangeabs --- .../@stdlib/stats/strided/nanrangeabs/README.md | 6 ++---- .../stats/strided/nanrangeabs/benchmark/benchmark.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/strided/nanrangeabs/README.md b/lib/node_modules/@stdlib/stats/strided/nanrangeabs/README.md index 933430db78b5..b96daf4e5a2d 100644 --- a/lib/node_modules/@stdlib/stats/strided/nanrangeabs/README.md +++ b/lib/node_modules/@stdlib/stats/strided/nanrangeabs/README.md @@ -44,9 +44,8 @@ Computes the [range][range] of absolute values of a strided array, ignoring `NaN ```javascript var x = [ 1.0, -2.0, NaN, 2.0 ]; -var N = x.length; -var v = nanrangeabs( N, x, 1 ); +var v = nanrangeabs( x.length, x, 1 ); // returns 1.0 ``` @@ -85,9 +84,8 @@ Computes the [range][range] of absolute values of a strided array, ignoring `NaN ```javascript var x = [ 1.0, -2.0, NaN, 2.0 ]; -var N = x.length; -var v = nanrangeabs.ndarray( N, x, 1, 0 ); +var v = nanrangeabs.ndarray( x.length, x, 1, 0 ); // returns 1.0 ``` diff --git a/lib/node_modules/@stdlib/stats/strided/nanrangeabs/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/strided/nanrangeabs/benchmark/benchmark.js index a460b545b427..9eb86a3432c1 100644 --- a/lib/node_modules/@stdlib/stats/strided/nanrangeabs/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/strided/nanrangeabs/benchmark/benchmark.js @@ -28,7 +28,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; -var nanrangeabs = require( './../lib/main.js' ); +var nanrangeabs = require( './../lib' ); // FUNCTIONS // From 8860c41051004c21339e17d2fad17632830b8b03 Mon Sep 17 00:00:00 2001 From: Mandeep2333 Date: Wed, 11 Mar 2026 09:16:26 +0530 Subject: [PATCH 2/2] chore: fix JavaScript lint errors (issue #ISSUE_NUMBER) --- .../assert/is-prime/benchmark/benchmark.js | 2 +- .../strided/ops/mul-by/test/test.ndarray.js | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-prime/benchmark/benchmark.js b/lib/node_modules/@stdlib/assert/is-prime/benchmark/benchmark.js index ae2235066353..0a221a57ebbe 100644 --- a/lib/node_modules/@stdlib/assert/is-prime/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/assert/is-prime/benchmark/benchmark.js @@ -16,7 +16,7 @@ * limitations under the License. */ -/* eslint-disable no-new-wrappers, no-empty-function */ +/* eslint-disable no-empty-function */ 'use strict'; diff --git a/lib/node_modules/@stdlib/math/strided/ops/mul-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/ops/mul-by/test/test.ndarray.js index e2600a6bc74e..dcf243fa1e39 100644 --- a/lib/node_modules/@stdlib/math/strided/ops/mul-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/ops/mul-by/test/test.ndarray.js @@ -76,19 +76,24 @@ tape( 'the function performs element-wise multiplication via a callback function mulBy( x.length, x, 1, 0, y, 1, 0, z, 1, 0, accessor ); t.deepEqual( z, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array - y = new Array( 5 ); // sparse array - z = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; + x = []; +x.length = 5; // sparse array +y = []; +y.length = 5; // sparse array +z = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; - expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; +expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; mulBy( x.length, x, 1, 0, y, 1, 0, z, 1, 0, accessor ); t.deepEqual( z, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array - x[ 2 ] = rand(); - y = new Array( 5 ); // sparse array - y[ 2 ] = rand(); + x = []; +x.length = 5; // sparse array +x[ 2 ] = rand(); + +y = []; +y.length = 5; // sparse array +y[ 2 ] = rand(); z = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = z.slice();