Skip to content

Commit 29f9c54

Browse files
committed
fix: critical bug! use correct indexing formula
--- 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent ec95268 commit 29f9c54

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

lib/node_modules/@stdlib/lapack/base/dlascl/lib/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function scaleBanded( KL, KU, M, N, A, strideA1, strideA2, offsetA, isrm, mul )
439439
k4 = KL + KU + M - 1;
440440

441441
if ( isrm ) {
442-
idx = offsetA + ( ( KL + 1 ) * strideA1 );
442+
idx = offsetA + ( ( KL + KU ) * strideA1 );
443443
del = strideA2 - strideA1;
444444

445445
for ( i1 = 0; i1 < M; i1++ ) {

lib/node_modules/@stdlib/lapack/base/dlascl/test/fixtures/banded_row_major.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@
44
"M": 5,
55
"N": 5,
66
"KL": 2,
7-
"KU": 1,
7+
"KU": 2,
88
"CFROM": 1.0,
99
"CTO": 10.0,
1010
"A": [
1111
0.0, 0.0, 0.0, 0.0, 0.0,
1212
0.0, 0.0, 0.0, 0.0, 0.0,
13+
0.0, 0.0, 9.8, 9.9, 10.0,
1314
0.0, 1.2, 2.3, 3.4, 4.5,
1415
1.1, 2.2, 3.3, 4.4, 5.5,
1516
2.1, 3.2, 4.3, 5.4, 0.0,
1617
3.1, 4.2, 5.3, 0.0, 0.0
1718
],
1819
"A_mat": [
19-
[ 1.1, 1.2, 0.0, 0.0, 0.0 ],
20-
[ 2.1, 2.2, 2.3, 0.0, 0.0 ],
21-
[ 3.1, 3.2, 3.3, 3.4, 0.0 ],
20+
[ 1.1, 1.2, 9.8, 0.0, 0.0 ],
21+
[ 2.1, 2.2, 2.3, 9.9, 0.0 ],
22+
[ 3.1, 3.2, 3.3, 3.4, 10.0 ],
2223
[ 0.0, 4.2, 4.3, 4.4, 4.5 ],
2324
[ 0.0, 0.0, 5.3, 5.4, 5.5 ]
2425
],
@@ -27,17 +28,18 @@
2728
"strideA2": 1,
2829
"offsetA": 0,
2930
"A_out": [
30-
0.0, 0.0, 0.0, 0.0, 0.0,
31-
0.0, 0.0, 0.0, 0.0, 0.0,
32-
0.0, 12.0, 23.0, 34.0, 45.0,
31+
0.0, 0.0, 0.0, 0.0, 0.0,
32+
0.0, 0.0, 0.0, 0.0, 0.0,
33+
0.0, 0.0, 98.0, 99.0, 100.0,
34+
0.0, 12.0, 23.0, 34.0, 45.0,
3335
11.0, 22.0, 33.0, 44.0, 55.0,
3436
21.0, 32.0, 43.0, 54.0, 0.0,
35-
31.0, 42.0, 53.0, 0.0, 0.0
37+
31.0, 42.0, 53.0, 0.0, 0.0
3638
],
3739
"A_out_mat": [
38-
[ 11.0, 12.0, 0.0, 0.0, 0.0 ],
39-
[ 21.0, 22.0, 23.0, 0.0, 0.0 ],
40-
[ 31.0, 32.0, 33.0, 34.0, 0.0 ],
40+
[ 11.0, 12.0, 98.0, 0.0, 0.0 ],
41+
[ 21.0, 22.0, 23.0, 99.0, 0.0 ],
42+
[ 31.0, 32.0, 33.0, 34.0, 100.0 ],
4143
[ 0.0, 42.0, 43.0, 44.0, 45.0 ],
4244
[ 0.0, 0.0, 53.0, 54.0, 55.0 ]
4345
]

0 commit comments

Comments
 (0)