From 80791d20b0f034712565a9318b4a61a67e1ad2de Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 08:14:23 +0000 Subject: [PATCH 1/6] refactor: normalize dimension-check error construction in `ndarray/iter/columns` Wrap the existing plain-string `TypeError` for the `ndims < 2` check in `format()`, matching the construction style already used by every other throw in `lib/main.js` (including the `format()`-with-no-arguments call for the read-only `Error`). All 14 packages in `@stdlib/ndarray/iter` use `format()` for the bulk of their throws (89% of throws across the namespace); this normalizes the one residual plain-string throw in this package to the canonical convention. The error message text and `TypeError` class are unchanged, so the change is invisible to consumers. --- lib/node_modules/@stdlib/ndarray/iter/columns/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/iter/columns/lib/main.js b/lib/node_modules/@stdlib/ndarray/iter/columns/lib/main.js index c0743073434e..bf24a9444688 100644 --- a/lib/node_modules/@stdlib/ndarray/iter/columns/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/iter/columns/lib/main.js @@ -120,7 +120,7 @@ function nditerColumns( x ) { // Ensure that the input array has sufficient dimensions... if ( ndims < 2 ) { - throw new TypeError( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ); + throw new TypeError( format( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ) ); } // Check whether the input array is empty... N = numel( shape ); From e9b39e3e62d08882ec48280093d215e5cfd64022 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 08:14:29 +0000 Subject: [PATCH 2/6] refactor: normalize dimension-check error construction in `ndarray/iter/column-entries` Wrap the existing plain-string `TypeError` for the `ndims < 2` check in `format()`, matching the construction style already used by every other throw in `lib/main.js` (including the `format()`-with-no-arguments call for the read-only `Error`). All 14 packages in `@stdlib/ndarray/iter` use `format()` for the bulk of their throws (89% of throws across the namespace); this normalizes the one residual plain-string throw in this package to the canonical convention. The error message text and `TypeError` class are unchanged, so the change is invisible to consumers. --- .../@stdlib/ndarray/iter/column-entries/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/iter/column-entries/lib/main.js b/lib/node_modules/@stdlib/ndarray/iter/column-entries/lib/main.js index fd7b8c3e50a3..7df994be3ede 100644 --- a/lib/node_modules/@stdlib/ndarray/iter/column-entries/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/iter/column-entries/lib/main.js @@ -120,7 +120,7 @@ function nditerColumnEntries( x ) { // Ensure that the input array has sufficient dimensions... if ( ndims < 2 ) { - throw new TypeError( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ); + throw new TypeError( format( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ) ); } // Check whether the input array is empty... From 4821b93e52a923877770087c3c8bf381ecb68e7e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 08:14:35 +0000 Subject: [PATCH 3/6] refactor: normalize dimension-check error construction in `ndarray/iter/rows` Wrap the existing plain-string `TypeError` for the `ndims < 2` check in `format()`, matching the construction style already used by every other throw in `lib/main.js` (including the `format()`-with-no-arguments call for the read-only `Error`). All 14 packages in `@stdlib/ndarray/iter` use `format()` for the bulk of their throws (89% of throws across the namespace); this normalizes the one residual plain-string throw in this package to the canonical convention. The error message text and `TypeError` class are unchanged, so the change is invisible to consumers. --- lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js b/lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js index 2e5ef326fdd5..a649a152f69e 100644 --- a/lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js @@ -120,7 +120,7 @@ function nditerRows( x ) { // Ensure that the input array has sufficient dimensions... if ( ndims < 2 ) { - throw new TypeError( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ); + throw new TypeError( format( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ) ); } // Check whether the input array is empty... N = numel( shape ); From 8d0e156dbefbebaabea173f5b109054bc018b50d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 08:14:41 +0000 Subject: [PATCH 4/6] refactor: normalize dimension-check error construction in `ndarray/iter/row-entries` Wrap the existing plain-string `TypeError` for the `ndims < 2` check in `format()`, matching the construction style already used by every other throw in `lib/main.js` (including the `format()`-with-no-arguments call for the read-only `Error`). All 14 packages in `@stdlib/ndarray/iter` use `format()` for the bulk of their throws (89% of throws across the namespace); this normalizes the one residual plain-string throw in this package to the canonical convention. The error message text and `TypeError` class are unchanged, so the change is invisible to consumers. --- lib/node_modules/@stdlib/ndarray/iter/row-entries/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/iter/row-entries/lib/main.js b/lib/node_modules/@stdlib/ndarray/iter/row-entries/lib/main.js index 9e713ea1c967..739ffbeb5d3b 100644 --- a/lib/node_modules/@stdlib/ndarray/iter/row-entries/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/iter/row-entries/lib/main.js @@ -120,7 +120,7 @@ function nditerRowEntries( x ) { // Ensure that the input array has sufficient dimensions... if ( ndims < 2 ) { - throw new TypeError( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ); + throw new TypeError( format( 'invalid argument. First argument must be an ndarray having two or more dimensions.' ) ); } // Check whether the input array is empty... From d75d054707f7b116ccae878eaceeada8e4911eab Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 08:14:46 +0000 Subject: [PATCH 5/6] refactor: normalize dimension-check error construction in `ndarray/iter/matrices` Wrap the existing plain-string `TypeError` for the `ndims < 3` check in `format()`, matching the construction style already used by every other throw in `lib/main.js` (including the `format()`-with-no-arguments call for the read-only `Error`). All 14 packages in `@stdlib/ndarray/iter` use `format()` for the bulk of their throws (89% of throws across the namespace); this normalizes the one residual plain-string throw in this package to the canonical convention. The error message text and `TypeError` class are unchanged, so the change is invisible to consumers. --- lib/node_modules/@stdlib/ndarray/iter/matrices/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/iter/matrices/lib/main.js b/lib/node_modules/@stdlib/ndarray/iter/matrices/lib/main.js index 517c2a210e26..6d098e5f08ba 100644 --- a/lib/node_modules/@stdlib/ndarray/iter/matrices/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/iter/matrices/lib/main.js @@ -114,7 +114,7 @@ function nditerMatrices( x ) { // Ensure that the input array has sufficient dimensions... if ( ndims < 3 ) { - throw new TypeError( 'invalid argument. First argument must be an ndarray having at least three dimensions.' ); + throw new TypeError( format( 'invalid argument. First argument must be an ndarray having at least three dimensions.' ) ); } // Check whether the input array is empty... N = numel( shape ); From 0db262530d5a6b9d34e85f12b61d80017fbf6860 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 08:14:52 +0000 Subject: [PATCH 6/6] refactor: normalize dimension-check error construction in `ndarray/iter/matrix-entries` Wrap the existing plain-string `TypeError` for the `ndims < 3` check in `format()`, matching the construction style already used by every other throw in `lib/main.js` (including the `format()`-with-no-arguments call for the read-only `Error`). All 14 packages in `@stdlib/ndarray/iter` use `format()` for the bulk of their throws (89% of throws across the namespace); this normalizes the one residual plain-string throw in this package to the canonical convention. The error message text and `TypeError` class are unchanged, so the change is invisible to consumers. --- .../@stdlib/ndarray/iter/matrix-entries/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/iter/matrix-entries/lib/main.js b/lib/node_modules/@stdlib/ndarray/iter/matrix-entries/lib/main.js index 294cabf77c43..ea6ba6a23b5b 100644 --- a/lib/node_modules/@stdlib/ndarray/iter/matrix-entries/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/iter/matrix-entries/lib/main.js @@ -120,7 +120,7 @@ function nditerMatrixEntries( x ) { // Ensure that the input array has sufficient dimensions... if ( ndims < 3 ) { - throw new TypeError( 'invalid argument. First argument must be an ndarray having at least three dimensions.' ); + throw new TypeError( format( 'invalid argument. First argument must be an ndarray having at least three dimensions.' ) ); } // Check whether the input array is empty...