Skip to content

Commit f60f4c4

Browse files
committed
test: add ndarray tests
--- 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: 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 7dc23e4 commit f60f4c4

File tree

139 files changed

+10997
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+10997
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function dlatrs( order, uplo, trans, diag, normin, N, A, LDA, X, CNORM ) {
8080
throw new TypeError( format( 'invalid argument. Third argument must be a valid transpose operation. Value: `%s`.', trans ) );
8181
}
8282
if ( !isDiagonalType( diag ) ) {
83-
throw new TypeError( format( 'invalid argument. Second argument must be a valid diagonal type. Value: `%s`.', diag ) );
83+
throw new TypeError( format( 'invalid argument. Fourth argument must be a valid diagonal type. Value: `%s`.', diag ) );
8484
}
8585
if ( isRowMajor( order ) && LDA < max( 1, N ) ) {
8686
throw new RangeError( format( 'invalid argument. Sixth argument must be greater than or equal to max(1,%d). Value: `%d`.', N, LDA ) );

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ var base = require( './base.js' );
6969
*/
7070
function dlatrs( uplo, trans, diag, normin, N, A, strideA1, strideA2, offsetA, X, strideX, offsetX, CNORM, strideCNORM, offsetCNORM ) {
7171
if ( !isMatrixTriangle( uplo ) ) {
72-
throw new TypeError( format( 'invalid argument. Second argument must be a valid side. Value: `%s`.', uplo ) );
72+
throw new TypeError( format( 'invalid argument. First argument must be a valid side. Value: `%s`.', uplo ) );
7373
}
7474
if ( !isTransposeOperation( trans ) ) {
75-
throw new TypeError( format( 'invalid argument. Third argument must be a valid transpose operation. Value: `%s`.', trans ) );
75+
throw new TypeError( format( 'invalid argument. Second argument must be a valid transpose operation. Value: `%s`.', trans ) );
7676
}
7777
if ( !isDiagonalType( diag ) ) {
78-
throw new TypeError( format( 'invalid argument. Second argument must be a valid diagonal type. Value: `%s`.', diag ) );
78+
throw new TypeError( format( 'invalid argument. Third argument must be a valid diagonal type. Value: `%s`.', diag ) );
7979
}
8080
if ( normin !== 'yes' && normin !== 'no' ) {
81-
throw new TypeError( format( 'invalid argument. Fifth argument must be either yes or no. Value: `%d`.', normin ) );
81+
throw new TypeError( format( 'invalid argument. Fourth argument must be either yes or no. Value: `%s`.', normin ) );
8282
}
8383
return base( uplo, trans, diag, normin, N, A, strideA1, strideA2, offsetA, X, strideX, offsetX, CNORM, strideCNORM, offsetCNORM );
8484
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"order": "column-major",
3+
"uplo": "upper",
4+
"trans": "no-transpose",
5+
"diag": "non-unit",
6+
"normin": "no",
7+
"N": 3,
8+
"LDA": 3,
9+
"A": [
10+
1,
11+
9999,
12+
0,
13+
9999,
14+
0,
15+
9999,
16+
1e+292,
17+
9999,
18+
1,
19+
9999,
20+
0,
21+
9999,
22+
1e+292,
23+
9999,
24+
1e+292,
25+
9999,
26+
1,
27+
9999
28+
],
29+
"strideA1": 2,
30+
"strideA2": 6,
31+
"offsetA": 0,
32+
"A_mat": [
33+
[
34+
1,
35+
1e+292,
36+
1e+292
37+
],
38+
[
39+
0,
40+
1,
41+
1e+292
42+
],
43+
[
44+
0,
45+
0,
46+
1
47+
]
48+
],
49+
"X": [
50+
1,
51+
9999,
52+
1,
53+
9999,
54+
1,
55+
9999
56+
],
57+
"strideX": 2,
58+
"offsetX": 0,
59+
"CNORM": [
60+
0,
61+
9999,
62+
0,
63+
9999,
64+
0,
65+
9999
66+
],
67+
"strideCNORM": 2,
68+
"offsetCNORM": 0,
69+
"expectedX": [
70+
5e+291,
71+
9999,
72+
-0.5,
73+
9999,
74+
4.9999999999999997e-293,
75+
9999
76+
],
77+
"expectedCNORM": [
78+
0,
79+
9999,
80+
1e+292,
81+
9999,
82+
2e+292,
83+
9999
84+
],
85+
"scale": 4.9999999999999997e-293
86+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"order": "row-major",
3+
"uplo": "upper",
4+
"trans": "no-transpose",
5+
"diag": "non-unit",
6+
"normin": "no",
7+
"N": 3,
8+
"LDA": 3,
9+
"A": [
10+
1,
11+
9999,
12+
1e+292,
13+
9999,
14+
1e+292,
15+
9999,
16+
0,
17+
9999,
18+
1,
19+
9999,
20+
1e+292,
21+
9999,
22+
0,
23+
9999,
24+
0,
25+
9999,
26+
1,
27+
9999
28+
],
29+
"strideA1": 6,
30+
"strideA2": 2,
31+
"offsetA": 0,
32+
"A_mat": [
33+
[
34+
1,
35+
1e+292,
36+
1e+292
37+
],
38+
[
39+
0,
40+
1,
41+
1e+292
42+
],
43+
[
44+
0,
45+
0,
46+
1
47+
]
48+
],
49+
"X": [
50+
1,
51+
9999,
52+
1,
53+
9999,
54+
1,
55+
9999
56+
],
57+
"strideX": 2,
58+
"offsetX": 0,
59+
"CNORM": [
60+
0,
61+
9999,
62+
0,
63+
9999,
64+
0,
65+
9999
66+
],
67+
"strideCNORM": 2,
68+
"offsetCNORM": 0,
69+
"expectedX": [
70+
5e+291,
71+
9999,
72+
-0.5,
73+
9999,
74+
4.9999999999999997e-293,
75+
9999
76+
],
77+
"expectedCNORM": [
78+
0,
79+
9999,
80+
1e+292,
81+
9999,
82+
2e+292,
83+
9999
84+
],
85+
"scale": 4.9999999999999997e-293
86+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"order": "column-major",
3+
"uplo": "lower",
4+
"trans": "no-transpose",
5+
"diag": "non-unit",
6+
"normin": "no",
7+
"N": 3,
8+
"LDA": 3,
9+
"A": [
10+
2,
11+
9999,
12+
1,
13+
9999,
14+
-1,
15+
9999,
16+
0,
17+
9999,
18+
3,
19+
9999,
20+
2,
21+
9999,
22+
0,
23+
9999,
24+
0,
25+
9999,
26+
4,
27+
9999
28+
],
29+
"strideA1": 2,
30+
"strideA2": 6,
31+
"offsetA": 0,
32+
"A_mat": [
33+
[
34+
2,
35+
0,
36+
0
37+
],
38+
[
39+
1,
40+
3,
41+
0
42+
],
43+
[
44+
-1,
45+
2,
46+
4
47+
]
48+
],
49+
"X": [
50+
5,
51+
9999,
52+
10,
53+
9999,
54+
20,
55+
9999
56+
],
57+
"strideX": 2,
58+
"offsetX": 0,
59+
"CNORM": [
60+
0,
61+
9999,
62+
0,
63+
9999,
64+
0,
65+
9999
66+
],
67+
"strideCNORM": 2,
68+
"offsetCNORM": 0,
69+
"expectedX": [
70+
2.5,
71+
9999,
72+
2.5,
73+
9999,
74+
4.375,
75+
9999
76+
],
77+
"expectedCNORM": [
78+
2,
79+
9999,
80+
2,
81+
9999,
82+
0,
83+
9999
84+
],
85+
"scale": 1
86+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"order": "row-major",
3+
"uplo": "lower",
4+
"trans": "no-transpose",
5+
"diag": "non-unit",
6+
"normin": "no",
7+
"N": 3,
8+
"LDA": 3,
9+
"A": [
10+
2,
11+
9999,
12+
0,
13+
9999,
14+
0,
15+
9999,
16+
1,
17+
9999,
18+
3,
19+
9999,
20+
0,
21+
9999,
22+
-1,
23+
9999,
24+
2,
25+
9999,
26+
4,
27+
9999
28+
],
29+
"strideA1": 6,
30+
"strideA2": 2,
31+
"offsetA": 0,
32+
"A_mat": [
33+
[
34+
2,
35+
0,
36+
0
37+
],
38+
[
39+
1,
40+
3,
41+
0
42+
],
43+
[
44+
-1,
45+
2,
46+
4
47+
]
48+
],
49+
"X": [
50+
5,
51+
9999,
52+
10,
53+
9999,
54+
20,
55+
9999
56+
],
57+
"strideX": 2,
58+
"offsetX": 0,
59+
"CNORM": [
60+
0,
61+
9999,
62+
0,
63+
9999,
64+
0,
65+
9999
66+
],
67+
"strideCNORM": 2,
68+
"offsetCNORM": 0,
69+
"expectedX": [
70+
2.5,
71+
9999,
72+
2.5,
73+
9999,
74+
4.375,
75+
9999
76+
],
77+
"expectedCNORM": [
78+
2,
79+
9999,
80+
2,
81+
9999,
82+
0,
83+
9999
84+
],
85+
"scale": 1
86+
}

0 commit comments

Comments
 (0)