Skip to content

Commit ec7efeb

Browse files
committed
fix: resolved errors
--- 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: passed - 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: 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: passed - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent ea43236 commit ec7efeb

File tree

7 files changed

+47
-51
lines changed

7 files changed

+47
-51
lines changed

lib/node_modules/@stdlib/blas/base/icamax/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ console.log( icx );
161161

162162
[blas]: http://www.netlib.org/blas
163163

164-
[icamax]: https://netlib.org/lapack/explore-html/d0/da5/izamax_8f.html
164+
[icamax]: https://www.netlib.org/lapack/explore-html/dd/d52/group__iamax_gafdf273dcc3f020e2aa5c716c1b3d7265.html
165165

166166
[@stdlib/array/complex64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex64
167167

lib/node_modules/@stdlib/blas/base/icamax/benchmark/benchmark.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ var options = {
4646
* @returns {Function} benchmark function
4747
*/
4848
function createBenchmark( len ) {
49-
var cx;
49+
var cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5050

51-
cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5251
return benchmark;
5352

5453
/**
@@ -58,18 +57,18 @@ function createBenchmark( len ) {
5857
* @param {Benchmark} b - benchmark instance
5958
*/
6059
function benchmark( b ) {
61-
var icx;
60+
var idx;
6261
var i;
6362

6463
b.tic();
6564
for ( i = 0; i < b.iterations; i++ ) {
66-
icx = icamax( cx.length, cx, 1 );
67-
if ( isnan( icx ) ) {
65+
idx = icamax( cx.length, cx, 1 );
66+
if ( isnan( idx ) ) {
6867
b.fail( 'should not return NaN' );
6968
}
7069
}
7170
b.toc();
72-
if ( isnan( icx ) ) {
71+
if ( isnan( idx ) ) {
7372
b.fail( 'should not return NaN' );
7473
}
7574
b.pass( 'benchmark finished' );

lib/node_modules/@stdlib/blas/base/icamax/benchmark/benchmark.ndarray.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ var options = {
4646
* @returns {Function} benchmark function
4747
*/
4848
function createBenchmark( len ) {
49-
var cx;
49+
var cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5050

51-
cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5251
return benchmark;
5352

5453
/**
@@ -58,18 +57,18 @@ function createBenchmark( len ) {
5857
* @param {Benchmark} b - benchmark instance
5958
*/
6059
function benchmark( b ) {
61-
var icx;
60+
var idx;
6261
var i;
6362

6463
b.tic();
6564
for ( i = 0; i < b.iterations; i++ ) {
66-
icx = icamax( cx.length, cx, 1, 0 );
67-
if ( isnan( icx ) ) {
65+
idx = icamax( cx.length, cx, 1, 0 );
66+
if ( isnan( idx ) ) {
6867
b.fail( 'should not return NaN' );
6968
}
7069
}
7170
b.toc();
72-
if ( isnan( icx ) ) {
71+
if ( isnan( idx ) ) {
7372
b.fail( 'should not return NaN' );
7473
}
7574
b.pass( 'benchmark finished' );

lib/node_modules/@stdlib/blas/base/icamax/docs/repl.txt

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
{{alias}}( N, cx, strideX )
2+
{{alias}}( N, cx, stride )
33
Finds the index of the first element having maximum |Re(.)| + |Im(.)|.
44

5-
The `N` and `strideX` parameters determine which elements in `cx` are
5+
The `N` and `stride` parameters determine which elements in `cx` are
66
accessed at runtime.
77

88
Indexing is relative to the first index. To introduce an offset, use typed
@@ -18,35 +18,34 @@
1818
cx: Complex64Array
1919
Input array.
2020

21-
strideX: integer
21+
stride: integer
2222
Index increment for `cx`.
2323

2424
Returns
2525
-------
26-
icx: integer
26+
idx: integer
2727
Index value.
2828

2929
Examples
3030
--------
3131
// Standard Usage:
32-
> var cx;
33-
> cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
34-
> var icx = {{alias}}( cx.length, cx, 1 )
32+
> var cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
33+
> var idx = {{alias}}( cx.length, cx, 1 )
3534
1
3635

37-
// Using `N` and `strideX` parameters:
36+
// Using `N` and `stride` parameters:
3837
> cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
39-
> icx = {{alias}}( 2, cx, 2 )
38+
> idx = {{alias}}( 2, cx, 2 )
4039
1
4140

4241
// Using view offsets:
4342
> var cx0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
4443
> var cx1 = new {{alias:@stdlib/array/complex64}}( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 );
45-
> icx = {{alias}}( 2, cx1, 1 )
44+
> idx = {{alias}}( 2, cx1, 1 )
4645
1
4746

4847

49-
{{alias}}.ndarray( N, cx, strideX, offsetX )
48+
{{alias}}.ndarray( N, cx, stride, offsetX )
5049
Finds the index of the first element having the maximum absolute value using
5150
alternative indexing semantics.
5251

@@ -62,28 +61,27 @@
6261
cx: Complex64Array
6362
Input array.
6463

65-
strideX: integer
64+
stride: integer
6665
Index increment for `cx`.
6766

6867
offsetX: integer
6968
Starting index of `cx`.
7069

7170
Returns
7271
-------
73-
icx: integer
72+
idx: integer
7473
Index value.
7574

7675
Examples
7776
--------
7877
// Standard Usage:
79-
> var cx;
80-
> cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
81-
> var icx = {{alias}}.ndarray( cx.length, cx, 1, 0 )
78+
> var cx = new {{alias:@stdlib/array/complex64}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0 ] );
79+
> var idx = {{alias}}.ndarray( cx.length, cx, 1, 0 )
8280
1
8381

8482
// Using an index offset:
8583
> cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
86-
> icx = {{alias}}.ndarray( 2, cx, 1, 1 )
84+
> idx = {{alias}}.ndarray( 2, cx, 1, 1 )
8785
1
8886

8987
See Also

lib/node_modules/@stdlib/blas/base/icamax/docs/types/index.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,61 +31,61 @@ interface Routine {
3131
*
3232
* @param N - number of indexed elements
3333
* @param cx - input array
34-
* @param strideX - stride length for `cx`
34+
* @param stride - stride length for `cx`
3535
* @returns index value
3636
*
3737
* @example
3838
* var Complex64Array = require( '@stdlib/array/complex64' );
3939
*
4040
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
4141
*
42-
* var icx = icamax( cx.length, cx, 1 );
42+
* var idx = icamax( cx.length, cx, 1 );
4343
* // returns 1
4444
*/
45-
( N: number, zx: Complex64Array, strideX: number ): number;
45+
( N: number, cx: Complex64Array, stride: number ): number;
4646

4747
/**
4848
* Finds the index of the first element having maximum |Re(.)| + |Im(.)| using alternative indexing semantics.
4949
*
5050
* @param N - number of indexed elements
5151
* @param cx - input array
52-
* @param strideX - stride length for `zx`
53-
* @param offsetX - starting index for `zx`
52+
* @param stride - stride length for `cx`
53+
* @param offset - starting index for `cx`
5454
* @returns index value
5555
*
5656
* @example
5757
* var Complex64Array = require( '@stdlib/array/complex64' );
5858
*
5959
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
6060
*
61-
* var icx = icamax.ndarray( cx.length, cx, 1, 0 );
61+
* var idx = icamax.ndarray( cx.length, cx, 1, 0 );
6262
* // returns 1
6363
*/
64-
ndarray( N: number, zx: Complex64Array, strideX: number, offsetX: number ): number;
64+
ndarray( N: number, cx: Complex64Array, stride: number, offset: number ): number;
6565
}
6666

6767
/**
6868
* Finds the index of the first element having maximum |Re(.)| + |Im(.)|
6969
*
7070
* @param N - number of indexed elements
71-
* @param zx - input array
72-
* @param strideX - stride length for `cx`
71+
* @param cx - input array
72+
* @param stride - stride length for `cx`
7373
* @returns index value
7474
*
7575
* @example
7676
* var Complex64Array = require( '@stdlib/array/complex64' );
7777
*
7878
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
7979
*
80-
* var icx = icamax( cx.length, cx, 1 );
80+
* var idx = icamax( cx.length, cx, 1 );
8181
* // returns 1
8282
*
8383
* @example
8484
* var Complex64Array = require( '@stdlib/array/complex64' );
8585
*
8686
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
8787
*
88-
* var icx = icamax.ndarray( cx.length, cx, 1, 0 );
88+
* var idx = icamax.ndarray( cx.length, cx, 1, 0 );
8989
* // returns 1
9090
*/
9191
declare var icamax: Routine;

lib/node_modules/@stdlib/blas/base/icamax/lib/icamax.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ var ndarray = require( './ndarray.js' );
3030
* Finds the index of the first element having maximum |Re(.)| + |Im(.)|.
3131
*
3232
* @param {PositiveInteger} N - number of indexed elements
33-
* @param {Float64Array} x - input array
34-
* @param {integer} strideX - `x` stride length
33+
* @param {Float64Array} cx - input array
34+
* @param {integer} stride - `cx` stride length
3535
* @returns {integer} index value
3636
*
3737
* @example
3838
* var Complex64Array = require( '@stdlib/array/complex64' );
3939
*
40-
* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
40+
* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
4141
*
42-
* var icx = icamax( x.length, x, 1 );
42+
* var idx = icamax( cx.length, cx, 1 );
4343
* // returns 3
4444
*/
45-
function icamax( N, x, strideX ) {
46-
var ox = stride2offset( N, strideX );
47-
return ndarray( N, x, strideX, ox );
45+
function icamax( N, cx, stride ) {
46+
var ox = stride2offset( N, stride );
47+
return ndarray( N, cx, stride, ox );
4848
}
4949

5050

lib/node_modules/@stdlib/blas/base/icamax/lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
* var Complex64Array = require( '@stdlib/array/complex64' );
2828
* var icamax = require( '@stdlib/blas/base/icamax' );
2929
*
30-
* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
30+
* var cx = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
3131
*
32-
* var icx = icamax( x.length, x, 1 );
32+
* var idx = icamax( cx.length, cx, 1 );
3333
* // returns 1
3434
*
3535
* @example
@@ -38,7 +38,7 @@
3838
*
3939
* var cx = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
4040
*
41-
* var icx = icamax( cx.length, cx, 1, 0 );
41+
* var idx = icamax.ndarray( cx.length, cx, 1, 0 );
4242
* // returns 1
4343
*/
4444

0 commit comments

Comments
 (0)