From 1ec05283e19daf935b18405a3d32ce197d5b6277 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 19:26:17 +0000 Subject: [PATCH 1/8] fix: bounds and indexing for column wise packing updated --- 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 --- --- .../array/base/banded/to-compact/lib/main.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js index ff000660199a..5d5723cd58a1 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js @@ -54,11 +54,10 @@ var zeros2d = require( '@stdlib/array/base/zeros2d' ); * ]; * * var out = toCompact( M, 1, 1, true ); -* // returns [ [ 0, 11, 3 ], [ 2, 12, 5 ], [ 4, 13, 0 ] ] +* // returns [ [ 0, 11, 2 ], [ 3, 12, 4 ], [ 5, 13, 0 ] ] */ function toCompact( arr, ku, kl, colexicographic ) { var out; - var to; var M; var N; var i; @@ -70,12 +69,11 @@ function toCompact( arr, ku, kl, colexicographic ) { // Check whether to store diagonals along the columns... if ( colexicographic ) { - out = zeros2d( [ N, ku+kl+1 ] ); - for ( j = 0; j < N; j++ ) { - to = out[ j ]; - k = ku - j; - for ( i = max( 0, j-ku ); i < min( M, j+kl+1 ); i++ ) { - to[ k+i ] = arr[ i ][ j ]; + out = zeros2d( [ M, ku+kl+1 ] ); + for ( j = 0; j < M; j++ ) { + k = kl - j; + for ( i = max( 0, j-kl ); i < min( N, j+ku+1 ); i++ ) { + out[ j ][ i+k ] = arr[ j ][ i ]; } } return out; From 0927be367f185372fbd29b4094e49b2e20af194b Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 19:57:34 +0000 Subject: [PATCH 2/8] fix: main.js updated --- 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/array/base/banded/to-compact/lib/index.js | 2 +- .../@stdlib/array/base/banded/to-compact/lib/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/index.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/index.js index bf05d1afbd96..366cbb1fbfbd 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/index.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/index.js @@ -45,7 +45,7 @@ * ]; * * var out = toCompact( M, 1, 1, true ); -* // returns [ [ 0, 11, 3 ], [ 2, 12, 5 ], [ 4, 13, 0 ] ] +* // returns [ [ 0, 11, 2 ], [ 3, 12, 4 ], [ 5, 13, 0 ] ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js index 5d5723cd58a1..4e3f39a7a945 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js @@ -71,8 +71,8 @@ function toCompact( arr, ku, kl, colexicographic ) { if ( colexicographic ) { out = zeros2d( [ M, ku+kl+1 ] ); for ( j = 0; j < M; j++ ) { - k = kl - j; - for ( i = max( 0, j-kl ); i < min( N, j+ku+1 ); i++ ) { + k = ku - j; + for ( i = max( 0, j-ku ); i < min( N, j+kl+1 ); i++ ) { out[ j ][ i+k ] = arr[ j ][ i ]; } } From dc5ea753d4a62e8e6338697e6b031a2e312d86a4 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 19:58:52 +0000 Subject: [PATCH 3/8] test: test results updated --- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - 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 --- --- .../array/base/banded/to-compact/test/test.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js index 706c9fc93b74..06adf160c45a 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js @@ -94,11 +94,11 @@ tape( 'the function converts a banded nested array to compact banded storage ( c ]; expected = [ - [ 0, 0, 1, -2, -3 ], - [ 0, 2, 4, -5, -6 ], - [ 3, 5, 7, -8, -9 ], - [ 6, 8, 10, -11, 0 ], - [ 9, 11, 12, 0, 0 ] + [ 0, 0, 1, 2, 3 ], + [ 0, -2, 4, 5, 6 ], + [ -3, -5, 7, 8, 9 ], + [ -6, -8, 10, 11, 0 ], + [ -9, -11, 12, 0, 0 ] ]; actual = toCompact( arr, 2, 2, true ); t.deepEqual( actual, expected, 'returns expected value' ); @@ -114,21 +114,21 @@ tape( 'the function converts a banded nested array to compact banded storage ( c t.deepEqual( actual, expected, 'returns expected value' ); expected = [ - [ 0, 1 ], - [ 2, 4 ], - [ 5, 7 ], - [ 8, 10 ], - [ 11, 12 ] + [ 0, 1 ], + [ -2, 4 ], + [ -5, 7 ], + [ -8, 10 ], + [ -11, 12 ] ]; actual = toCompact( arr, 1, 0, true ); t.deepEqual( actual, expected, 'returns expected value' ); expected = [ - [ 1, -2, -3 ], - [ 4, -5, -6 ], - [ 7, -8, -9 ], - [ 10, -11, 0 ], - [ 12, 0, 0 ] + [ 1, 2, 3 ], + [ 4, 5, 6 ], + [ 7, 8, 9 ], + [ 10, 11, 0 ], + [ 12, 0, 0 ] ]; actual = toCompact( arr, 0, 2, true ); t.deepEqual( actual, expected, 'returns expected value' ); From bf311fabbc6db6192a90cc84a7cc7ed93c9ddb34 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 20:17:42 +0000 Subject: [PATCH 4/8] fix: main.js updated --- 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/array/base/banded/to-compact/lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js index 4e3f39a7a945..5d5723cd58a1 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/lib/main.js @@ -71,8 +71,8 @@ function toCompact( arr, ku, kl, colexicographic ) { if ( colexicographic ) { out = zeros2d( [ M, ku+kl+1 ] ); for ( j = 0; j < M; j++ ) { - k = ku - j; - for ( i = max( 0, j-ku ); i < min( N, j+kl+1 ); i++ ) { + k = kl - j; + for ( i = max( 0, j-kl ); i < min( N, j+ku+1 ); i++ ) { out[ j ][ i+k ] = arr[ j ][ i ]; } } From 5c7af2d79284d0b62f065bef7e6eea9c7e9c24d6 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 20:19:20 +0000 Subject: [PATCH 5/8] test: test results updated --- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - 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 --- --- .../array/base/banded/to-compact/test/test.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js index 06adf160c45a..670e768d8368 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/test/test.js @@ -114,21 +114,21 @@ tape( 'the function converts a banded nested array to compact banded storage ( c t.deepEqual( actual, expected, 'returns expected value' ); expected = [ - [ 0, 1 ], - [ -2, 4 ], - [ -5, 7 ], - [ -8, 10 ], - [ -11, 12 ] + [ 1, 2 ], + [ 4, 5 ], + [ 7, 8 ], + [ 10, 11 ], + [ 12, 0 ] ]; actual = toCompact( arr, 1, 0, true ); t.deepEqual( actual, expected, 'returns expected value' ); expected = [ - [ 1, 2, 3 ], - [ 4, 5, 6 ], - [ 7, 8, 9 ], - [ 10, 11, 0 ], - [ 12, 0, 0 ] + [ 0, 0, 1 ], + [ 0, -2, 4 ], + [ -3, -5, 7 ], + [ -6, -8, 10 ], + [ -9, -11, 12 ] ]; actual = toCompact( arr, 0, 2, true ); t.deepEqual( actual, expected, 'returns expected value' ); From 2ecf953cd6cb767b07f8864fcb42436ccc28ecb9 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 20:19:47 +0000 Subject: [PATCH 6/8] docs: examples updated --- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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 --- --- .../array/base/banded/to-compact/examples/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/examples/index.js b/lib/node_modules/@stdlib/array/base/banded/to-compact/examples/index.js index d49147c47dde..a2a514868747 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/examples/index.js +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/examples/index.js @@ -71,10 +71,10 @@ AC = toCompact( A, 2, 2, true ); console.log( AC ); /* e.g., => [ - [ 0, 0, 1, -2, -3 ], - [ 0, 2, 4, -5, -6 ], - [ 3, 5, 7, -8, -9 ], - [ 6, 8, 10, -11, 0 ], - [ 9, 11, 12, 0, 0 ] + [ 0, 0, 1, 2, 3 ], + [ 0, -2, 4, 5, 6 ], + [ -3, -5, 7, 8, 9 ], + [ -6, -8, 10, 11, 0 ], + [ -9, -11, 12, 0, 0 ] ] */ From c9627328ba022027172f161e46f252b442e64a16 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 20:37:13 +0000 Subject: [PATCH 7/8] docs: examples in types updated --- 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: na - 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: passed - task: lint_license_headers status: passed --- --- .../array/base/banded/to-compact/docs/types/index.d.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/base/banded/to-compact/docs/types/index.d.ts index 429562682ca5..04649d65094a 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/docs/types/index.d.ts @@ -20,12 +20,10 @@ /// -import { Collection } from '@stdlib/types/array'; - /** * Two-dimensional nested array. */ -type Array2D = Array>; +type Array2D = Array>; /** * Converts a two-dimensional banded nested array to compact banded storage. @@ -54,9 +52,9 @@ type Array2D = Array>; * ]; * * var out = toCompact( M, 1, 1, true ); -* // returns [ [ 0, 11, 3 ], [ 2, 12, 5 ], [ 4, 13, 0 ] ] +* // returns [ [ 0, 11, 2 ], [ 3, 12, 4 ], [ 5, 13, 0 ] ] */ -declare function toCompact( arr: Array2D, ku: number, kl: number, colexicographic: boolean ): Array2D; +declare function toCompact( arr: Array2D, ku: number, kl: number, colexicographic: boolean ): Array2D; // EXPORTS // From 66a3504b48441a5b0700d3932bbec1c28f383a03 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 20 Mar 2026 20:38:43 +0000 Subject: [PATCH 8/8] docs: readme updated --- 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: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - 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/array/base/banded/to-compact/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/banded/to-compact/README.md b/lib/node_modules/@stdlib/array/base/banded/to-compact/README.md index 702abc64ff6e..f890269eadb7 100644 --- a/lib/node_modules/@stdlib/array/base/banded/to-compact/README.md +++ b/lib/node_modules/@stdlib/array/base/banded/to-compact/README.md @@ -128,11 +128,11 @@ AC = toCompact( A, 1, 2, false ); AC = toCompact( A, 2, 2, true ); /* e.g., returns => [ - [ 0, 0, 1, -2, -3 ], - [ 0, 2, 4, -5, -6 ], - [ 3, 5, 7, -8, -9 ], - [ 6, 8, 10, -11, 0 ], - [ 9, 11, 12, 0, 0 ] + [ 0, 0, 1, 2, 3 ], + [ 0, -2, 4, 5, 6 ], + [ -3, -5, 7, 8, 9 ], + [ -6, -8, 10, 11, 0 ], + [ -9, -11, 12, 0, 0 ] ] */ ```