Skip to content

Commit a69fa0b

Browse files
committed
fix: out should be an int32array because it contains indices
--- 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: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - 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 2ca9245 commit a69fa0b

File tree

9 files changed

+125
-115
lines changed

9 files changed

+125
-115
lines changed

lib/node_modules/@stdlib/lapack/base/dgebal/benchmark/benchmark.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2024 The Stdlib Authors.
4+
* Copyright (c) 2025 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ var Float64Array = require( '@stdlib/array/float64' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2727
var pow = require( '@stdlib/math/base/special/pow' );
2828
var floor = require( '@stdlib/math/base/special/floor' );
29+
var Int32Array = require( '@stdlib/array/int32' );
2930
var pkg = require( './../package.json' ).name;
3031
var dgebal = require( './../lib/dgebal.js' );
3132

@@ -61,7 +62,7 @@ function createBenchmark( order, N, job ) {
6162
var A;
6263

6364
scale = new Float64Array( N );
64-
out = new Float64Array( 2 );
65+
out = new Int32Array( 2 );
6566

6667
A = uniform( N*N, -10.0, 10.0, {
6768
'dtype': 'float64'

lib/node_modules/@stdlib/lapack/base/dgebal/benchmark/benchmark.ndarray.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2024 The Stdlib Authors.
4+
* Copyright (c) 2025 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string
2727
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2828
var pow = require( '@stdlib/math/base/special/pow' );
2929
var floor = require( '@stdlib/math/base/special/floor' );
30+
var Int32Array = require( '@stdlib/array/int32' );
3031
var pkg = require( './../package.json' ).name;
3132
var dgebal = require( './../lib/ndarray.js' );
3233

@@ -64,7 +65,7 @@ function createBenchmark( order, N, job ) {
6465
var A;
6566

6667
scale = new Float64Array( N );
67-
out = new Float64Array( 2 );
68+
out = new Int32Array( 2 );
6869

6970
A = uniform( N*N, -10.0, 10.0, {
7071
'dtype': 'float64'

lib/node_modules/@stdlib/lapack/base/dgebal/examples/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
'use strict';
2020

2121
var Float64Array = require( '@stdlib/array/float64' );
22+
var Int32Array = require( '@stdlib/array/int32' );
2223
var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
2324
var dgebal = require( './../lib' );
2425

@@ -33,7 +34,7 @@ var A = new Float64Array( [ 1.0, 100.0, 0.0, 2.0, 200.0, 0.0, 0.0, 0.0, 3.0 ] );
3334
console.log( ndarray2array( A, shape, strides, offset, order ) );
3435

3536
// Define arrays to store the scaling factors
36-
var out = new Float64Array( 2 );
37+
var out = new Int32Array( 2 );
3738
var scale = new Float64Array( 3 );
3839

3940
// Permute and scale the matrix:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var dscal = require( '@stdlib/blas/base/dscal' ).ndarray;
5656
* @param {integer} strideA1 - stride of the first dimension of `A`
5757
* @param {integer} strideA2 - stride of the second dimension of `A`
5858
* @param {NonNegativeInteger} offsetA - starting index for `A`
59-
* @param {Float64Array} out - stores the first and last row/column of the balanced submatrix
59+
* @param {Int32Array} out - stores the first and last row/column of the balanced submatrix
6060
* @param {integer} strideOut - stride of `out`
6161
* @param {NonNegativeInteger} offsetOut - starting index for `out`
6262
* @param {Float64Array} scale - array containing permutation and scaling information
@@ -66,9 +66,10 @@ var dscal = require( '@stdlib/blas/base/dscal' ).ndarray;
6666
*
6767
* @example
6868
* var Float64Array = require( '@stdlib/array/float64' );
69+
* var Int32Array = require( '@stdlib/array/int32' );
6970
*
7071
* var A = new Float64Array( [ 1.0, 100.0, 0.0, 2.0, 200.0, 0.0, 0.0, 0.0, 3.0 ] );
71-
* var out = new Float64Array( 2 );
72+
* var out = new Int32Array( 2 );
7273
* var scale = new Float64Array( 3 );
7374
*
7475
* dgebal( 'both', 3, A, 3, 1, 0, out, 1, 0, scale, 1, 0 );

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var base = require( './base.js' );
4747
* @param {NonNegativeInteger} N - number of rows/columns in matrix `A`
4848
* @param {Float64Array} A - input matrix to be balanced
4949
* @param {NonNegativeInteger} LDA - leading dimension of `A`
50-
* @param {Float64Array} out - stores the first and last row/column of the balanced submatrix
50+
* @param {Int32Array} out - stores the first and last row/column of the balanced submatrix
5151
* @param {Float64Array} scale - array containing permutation and scaling information
5252
* @throws {TypeError} first argument must be a valid order
5353
* @throws {TypeError} second argument must be a valid job
@@ -56,9 +56,10 @@ var base = require( './base.js' );
5656
*
5757
* @example
5858
* var Float64Array = require( '@stdlib/array/float64' );
59+
* var Int32Array = require( '@stdlib/array/int32' );
5960
*
6061
* var A = new Float64Array( [ 1.0, 100.0, 0.0, 2.0, 200.0, 0.0, 0.0, 0.0, 3.0 ] );
61-
* var out = new Float64Array( 2 );
62+
* var out = new Int32Array( 2 );
6263
* var scale = new Float64Array( 3 );
6364
*
6465
* dgebal( 'row-major', 'both', 3, A, 3, out, scale );

lib/node_modules/@stdlib/lapack/base/dgebal/lib/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
*
2626
* @example
2727
* var Float64Array = require( '@stdlib/array/float64' );
28+
* var Int32Array = require( '@stdlib/array/int32' );
2829
* var dgebal = require( '@stdlib/lapack/base/dgebal' );
2930
*
3031
* var A = new Float64Array( [ 1.0, 100.0, 0.0, 2.0, 200.0, 0.0, 0.0, 0.0, 3.0 ] );
31-
* var out = new Float64Array( 2 );
32+
* var out = new Int32Array( 2 );
3233
* var scale = new Float64Array( 3 );
3334
*
3435
* dgebal( 'row-major', 'both', 3, A, 3, out, scale );
@@ -38,10 +39,11 @@
3839
*
3940
* @example
4041
* var Float64Array = require( '@stdlib/array/float64' );
42+
* var Int32Array = require( '@stdlib/array/int32' );
4143
* var dgebal = require( '@stdlib/lapack/base/dgebal' );
4244
*
4345
* var A = new Float64Array( [ 1.0, 100.0, 0.0, 2.0, 200.0, 0.0, 0.0, 0.0, 3.0 ] );
44-
* var out = new Float64Array( 2 );
46+
* var out = new Int32Array( 2 );
4547
* var scale = new Float64Array( 3 );
4648
*
4749
* dgebal.ndarray( 'both', 3, A, 3, 1, 0, out, 1, 0, scale, 1, 0 );

lib/node_modules/@stdlib/lapack/base/dgebal/lib/ndarray.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var base = require( './base.js' );
4646
* @param {integer} strideA1 - stride of the first dimension of `A`
4747
* @param {integer} strideA2 - stride of the second dimension of `A`
4848
* @param {NonNegativeInteger} offsetA - starting index for `A`
49-
* @param {Float64Array} out - stores the first and last row/column of the balanced submatrix
49+
* @param {Int32Array} out - stores the first and last row/column of the balanced submatrix
5050
* @param {integer} strideOut - stride of `out`
5151
* @param {NonNegativeInteger} offsetOut - starting index for `out`
5252
* @param {Float64Array} scale - array containing permutation and scaling information
@@ -57,9 +57,10 @@ var base = require( './base.js' );
5757
*
5858
* @example
5959
* var Float64Array = require( '@stdlib/array/float64' );
60+
* var Int32Array = require( '@stdlib/array/int32' );
6061
*
6162
* var A = new Float64Array( [ 1.0, 100.0, 0.0, 2.0, 200.0, 0.0, 0.0, 0.0, 3.0 ] );
62-
* var out = new Float64Array( 2 );
63+
* var out = new Int32Array( 2 );
6364
* var scale = new Float64Array( 3 );
6465
*
6566
* dgebal( 'both', 3, A, 3, 1, 0, out, 1, 0, scale, 1, 0 );

lib/node_modules/@stdlib/lapack/base/dgebal/test/test.dgebal.js

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
var tape = require( 'tape' );
2626
var Float64Array = require( '@stdlib/array/float64' );
27+
var Int32Array = require( '@stdlib/array/int32' );
2728
var dgebal = require( './../lib/dgebal.js' );
2829

2930

@@ -55,7 +56,7 @@ tape( 'the function throws an error if provided an invalid first argument', func
5556
];
5657

5758
A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
58-
out = new Float64Array( 2 );
59+
out = new Int32Array( 2 );
5960
scale = new Float64Array( 2 );
6061

6162
for ( i = 0; i < values.length; i++ ) {
@@ -85,7 +86,7 @@ tape( 'the function throws an error if provided an invalid second argument', fun
8586
];
8687

8788
A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
88-
out = new Float64Array( 2 );
89+
out = new Int32Array( 2 );
8990
scale = new Float64Array( 2 );
9091

9192
for ( i = 0; i < values.length; i++ ) {
@@ -113,7 +114,7 @@ tape( 'the function throws an error if provided an invalid second argument', fun
113114
];
114115

115116
A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
116-
out = new Float64Array( 2 );
117+
out = new Int32Array( 2 );
117118
scale = new Float64Array( 2 );
118119

119120
for ( i = 0; i < values.length; i++ ) {
@@ -136,7 +137,7 @@ tape( 'the function returns invalid indices and leaves the input array unchanged
136137
var A;
137138

138139
A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
139-
out = new Float64Array( 2 );
140+
out = new Int32Array( 2 );
140141
scale = new Float64Array( 2 );
141142

142143
info = dgebal( 'row-major', 'both', 0, A, 2, out, scale );
@@ -162,7 +163,7 @@ tape( 'the function returns expected values for job = none (row-major)', functio
162163
4.0, 5.0, 6.0,
163164
7.0, 8.0, 9.0
164165
]);
165-
out = new Float64Array( 2 );
166+
out = new Int32Array( 2 );
166167
scale = new Float64Array( 3 );
167168

168169
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -195,7 +196,7 @@ tape( 'the function returns expected values for job = none (column-major)', func
195196
2.0, 5.0, 8.0,
196197
3.0, 6.0, 9.0
197198
]);
198-
out = new Float64Array( 2 );
199+
out = new Int32Array( 2 );
199200
scale = new Float64Array( 3 );
200201

201202
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -228,7 +229,7 @@ tape( 'the function returns expected values for job = permute (row-major)', func
228229
0.0, 5.0, 0.0,
229230
3.0, 0.0, 4.0
230231
]);
231-
out = new Float64Array( 2 );
232+
out = new Int32Array( 2 );
232233
scale = new Float64Array( 3 );
233234

234235
expectedOut = new Float64Array( [ 0.0, 1.0 ] );
@@ -261,7 +262,7 @@ tape( 'the function returns expected values for job = permute (column-major)', f
261262
0.0, 5.0, 0.0,
262263
2.0, 0.0, 4.0
263264
]);
264-
out = new Float64Array( 2 );
265+
out = new Int32Array( 2 );
265266
scale = new Float64Array( 3 );
266267

267268
expectedOut = new Float64Array( [ 0.0, 1.0 ] );
@@ -294,7 +295,7 @@ tape( 'the function returns expected values for job = scale (row-major)', functi
294295
0.25, 0.25, 0.25,
295296
0.25, 0.25, 0.25
296297
]);
297-
out = new Float64Array( 2 );
298+
out = new Int32Array( 2 );
298299
scale = new Float64Array( 3 );
299300

300301
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -327,7 +328,7 @@ tape( 'the function returns expected values for job = scale (column-major)', fun
327328
16.0, 0.25, 0.25,
328329
16.0, 0.25, 0.25
329330
]);
330-
out = new Float64Array( 2 );
331+
out = new Int32Array( 2 );
331332
scale = new Float64Array( 3 );
332333

333334
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -360,7 +361,7 @@ tape( 'the function returns expected values for job = both (row-major)', functio
360361
0.0, 5.0, 0.0,
361362
100.0, 0.0, 4.0
362363
]);
363-
out = new Float64Array( 2 );
364+
out = new Int32Array( 2 );
364365
scale = new Float64Array( 3 );
365366

366367
expectedOut = new Float64Array( [ 0.0, 1.0 ] );
@@ -393,7 +394,7 @@ tape( 'the function returns expected values for job = both (column-major)', func
393394
0.0, 5.0, 0.0,
394395
2.0, 0.0, 4.0
395396
]);
396-
out = new Float64Array( 2 );
397+
out = new Int32Array( 2 );
397398
scale = new Float64Array( 3 );
398399

399400
expectedOut = new Float64Array( [ 0.0, 1.0 ] );
@@ -426,7 +427,7 @@ tape( 'the function returns expected values for job = both with complex input (r
426427
0.0, 2.0, 0.0,
427428
0.0, 0.0, 3.0
428429
]);
429-
out = new Float64Array( 2 );
430+
out = new Int32Array( 2 );
430431
scale = new Float64Array( 3 );
431432

432433
expectedOut = new Float64Array( [ 0.0, 0.0 ] );
@@ -459,7 +460,7 @@ tape( 'the function returns expected values for job = both with complex input (c
459460
1.0, 2.0, 0.0,
460461
0.0, 0.0, 3.0
461462
]);
462-
out = new Float64Array( 2 );
463+
out = new Int32Array( 2 );
463464
scale = new Float64Array( 3 );
464465

465466
expectedOut = new Float64Array( [ 0.0, 0.0 ] );
@@ -492,7 +493,7 @@ tape( 'the function returns expected values for job = both with complex input (r
492493
3.0, 4.0, 5.0,
493494
6.0, 0.0, 7.0
494495
]);
495-
out = new Float64Array( 2 );
496+
out = new Int32Array( 2 );
496497
scale = new Float64Array( 3 );
497498

498499
expectedOut = new Float64Array( [ 1.0, 2.0 ] );
@@ -525,7 +526,7 @@ tape( 'the function returns expected values for job = both with complex input (c
525526
0.0, 4.0, 0.0,
526527
2.0, 5.0, 7.0
527528
]);
528-
out = new Float64Array( 2 );
529+
out = new Int32Array( 2 );
529530
scale = new Float64Array( 3 );
530531

531532
expectedOut = new Float64Array( [ 1.0, 2.0 ] );
@@ -558,7 +559,7 @@ tape( 'the function returns expected values for job = scale with zero norm (row-
558559
2.0, 0.0, 5.0,
559560
3.0, 0.0, 6.0
560561
]);
561-
out = new Float64Array( 2 );
562+
out = new Int32Array( 2 );
562563
scale = new Float64Array( 3 );
563564

564565
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -591,7 +592,7 @@ tape( 'the function returns expected values for job = scale with zero norm (colu
591592
0.0, 0.0, 0.0,
592593
4.0, 5.0, 6.0
593594
]);
594-
out = new Float64Array( 2 );
595+
out = new Int32Array( 2 );
595596
scale = new Float64Array( 3 );
596597

597598
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -625,7 +626,7 @@ tape( 'the function returns expected values for job = scale with small values (r
625626
3.0e-4, 1.0, 2.0, 3.0e4,
626627
4.0e-4, 1.0, 2.0, 4.0e4
627628
]);
628-
out = new Float64Array( 2 );
629+
out = new Int32Array( 2 );
629630
scale = new Float64Array( 4 );
630631

631632
expectedOut = new Float64Array( [ 0.0, 3.0 ] );
@@ -660,7 +661,7 @@ tape( 'the function returns expected values for job = scale with small values (c
660661
2.0, 2.0, 2.0, 2.0,
661662
1.0e4, 2.0e4, 3.0e4, 4.0e4
662663
]);
663-
out = new Float64Array( 2 );
664+
out = new Int32Array( 2 );
664665
scale = new Float64Array( 4 );
665666

666667
expectedOut = new Float64Array( [ 0.0, 3.0 ] );
@@ -694,7 +695,7 @@ tape( 'the function returns expected values for job = both with large values (ro
694695
1.0e30, 1.0, 1.0e-30,
695696
1.0e30, 1.0, 1.0e-30
696697
]);
697-
out = new Float64Array( 2 );
698+
out = new Int32Array( 2 );
698699
scale = new Float64Array( 3 );
699700

700701
expectedOut = new Float64Array( [ 0.0, 2.0 ] );
@@ -727,7 +728,7 @@ tape( 'the function returns expected values for job = both with large values (co
727728
1.0, 1.0, 1.0,
728729
1.0e-30, 1.0e-30, 1.0e-30
729730
]);
730-
out = new Float64Array( 2 );
731+
out = new Int32Array( 2 );
731732
scale = new Float64Array( 3 );
732733

733734
expectedOut = new Float64Array( [ 0.0, 2.0 ] );

0 commit comments

Comments
 (0)