Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
e0c0786
fix: refactor `index-of`
headlessNode Sep 9, 2026
b841028
fix: refactor `last-index-of`
headlessNode Sep 9, 2026
9bf61a3
fix: refactor `index-of-truthy`
headlessNode Sep 9, 2026
4315045
fix: refactor `index-of-falsy`
headlessNode Sep 9, 2026
80e83d7
fix: refactor `last-index-of-truthy`
headlessNode Sep 9, 2026
291df78
fix: refactor `last-index-of-falsy`
headlessNode Sep 9, 2026
5184528
fix: refactor `index-of-not-equal`
headlessNode Sep 9, 2026
f3e6700
fix: refactor `index-of-less-than`
headlessNode Sep 10, 2026
29cf71b
fix: refactor `index-of-greater-than`
headlessNode Sep 10, 2026
8c0fc74
fix: refactor `index-of-greater-than-equal`
headlessNode Sep 10, 2026
a768d59
fix: refactor `index-of-less-than-equal`
headlessNode Sep 10, 2026
e1eb4c8
fix: refactor `index-of-same-value`
headlessNode Sep 10, 2026
446ae2a
fix: refactor `index-of-almost-same-value`
headlessNode Sep 10, 2026
c28ed51
docs: fix REPL examples in `gindex-of-same-value`
headlessNode Sep 10, 2026
7a7bb7c
fix: refactor `index-of-row`
headlessNode Sep 10, 2026
b766e73
fix: refactor `index-of-column`
headlessNode Sep 10, 2026
ec532f5
docs: add matrix visualization comments in `index-of-row`
headlessNode Sep 10, 2026
a257723
fix: refactor `last-index-of-row`
headlessNode Sep 10, 2026
4403459
fix: refactor `gindex-of-truthy-row` and `gindex-of-falsy-row`
headlessNode Sep 10, 2026
7ccdfb7
fix: refactor `first-index-equal`
headlessNode Sep 10, 2026
3cead0b
fix: refactor `first-index-less-than`
headlessNode Sep 10, 2026
f9a0d7e
fix: refactor `first-index-greater-than`
headlessNode Sep 10, 2026
4120aeb
fix: refactor `gfirst-index-greater-than-equal`
headlessNode Sep 10, 2026
3f9c3dc
fix: refactor `gfirst-index-less-than-equal`
headlessNode Sep 10, 2026
074cac9
fix: refactor `gfirst-index-not-equal`
headlessNode Sep 10, 2026
55bae32
fix: refactor `gfirst-index-almost-same-value`
headlessNode Sep 10, 2026
bc0810a
fix: refactor `last-index-equal`
headlessNode Sep 10, 2026
cc2b430
fix: refactor `glast-index-less-than`
headlessNode Sep 10, 2026
30f128d
fix: refactor `glast-index-not-equal`
headlessNode Sep 10, 2026
289d39b
fix: refactor `gfind-index`
headlessNode Sep 10, 2026
8d5e455
fix: refactor `gfind-last-index`
headlessNode Sep 10, 2026
a8f553c
fix: address audit findings in index-returning packages
headlessNode Sep 10, 2026
bba9d99
fix: apply suggestions from code review
headlessNode Sep 10, 2026
295c63e
fix: apply consistency fixes to `first-index-equal`
headlessNode Sep 11, 2026
87dde70
fix: apply consistency fixes to `first-index-less-than`
headlessNode Sep 11, 2026
81d1382
fix: apply consistency fixes to `first-index-less-than-equal`
headlessNode Sep 11, 2026
6fdd58a
fix: apply consistency fixes to `first-index-greater-than`
headlessNode Sep 11, 2026
1b987bf
fix: apply consistency fixes to `first-index-greater-than-equal`
headlessNode Sep 11, 2026
f0cf429
fix: apply consistency fixes to `first-index-not-equal`
headlessNode Sep 11, 2026
7cb04f6
fix: apply consistency fixes to `first-index-almost-same-value`
headlessNode Sep 11, 2026
7ff90d8
fix: apply consistency fixes to `last-index-equal`
headlessNode Sep 11, 2026
0989393
fix: apply consistency fixes to `last-index-less-than`
headlessNode Sep 11, 2026
8584178
fix: apply consistency fixes to `last-index-not-equal`
headlessNode Sep 11, 2026
afa6372
fix: apply consistency fixes to `index-of`
headlessNode Sep 11, 2026
1ec1d49
fix: apply consistency fixes to `index-of-truthy`
headlessNode Sep 11, 2026
12c2634
fix: apply consistency fixes to `index-of-falsy`
headlessNode Sep 11, 2026
6985cfb
fix: apply consistency fixes to `index-of-less-than`
headlessNode Sep 11, 2026
623fc87
fix: apply consistency fixes to `index-of-less-than-equal`
headlessNode Sep 11, 2026
b4b9cc0
fix: apply consistency fixes to `index-of-greater-than`
headlessNode Sep 11, 2026
f8baa7f
fix: apply consistency fixes to `index-of-greater-than-equal`
headlessNode Sep 11, 2026
1845358
fix: apply consistency fixes to `index-of-not-equal`
headlessNode Sep 11, 2026
6ab3527
fix: apply consistency fixes to `index-of-same-value`
headlessNode Sep 11, 2026
dd38e29
fix: apply consistency fixes to `index-of-almost-same-value`
headlessNode Sep 11, 2026
d1101b6
fix: apply consistency fixes to `last-index-of`
headlessNode Sep 11, 2026
0eaa5a0
fix: apply consistency fixes to `last-index-of-truthy`
headlessNode Sep 11, 2026
4057600
fix: apply consistency fixes to `last-index-of-falsy`
headlessNode Sep 11, 2026
d876a53
fix: apply consistency fixes to `index-of-row`
headlessNode Sep 11, 2026
1f18d8c
fix: apply consistency fixes to `index-of-column`
headlessNode Sep 11, 2026
f9f1be1
fix: apply consistency fixes to `last-index-of-row`
headlessNode Sep 11, 2026
563129f
fix: apply consistency fixes to `index-of-truthy-row`
headlessNode Sep 11, 2026
e689746
fix: apply consistency fixes to `find-index`
headlessNode Sep 11, 2026
2711b2e
fix: apply consistency fixes to `find-last-index`
headlessNode Sep 11, 2026
467ffe1
fix: apply consistency fixes to `first-index-almost-equal`
headlessNode Sep 11, 2026
e90c56f
fix: apply consistency fixes to `last-index-greater-than`
headlessNode Sep 11, 2026
36651b3
fix: apply consistency fixes to `last-index-almost-same-value`
headlessNode Sep 11, 2026
bce0dee
fix: apply consistency fixes to `last-index-less-than`
headlessNode Sep 11, 2026
17138c5
fix: apply suggestions from review
headlessNode Sep 11, 2026
6b7e0f8
fix: apply suggestions from code review
headlessNode Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ limitations under the License.

<!-- /.intro -->

<!-- Package usage documentation. -->

<section class="usage">

## Usage
Expand Down Expand Up @@ -196,17 +198,20 @@ var out = cindexOfColumn.ndarray( 2, 2, A, 1, 2, 0, x, 1, 0, workspace, 1, 0 );

<!-- /.usage -->

<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

## Notes

- If `M <= 0` or `N <= 0`, both functions return `-1`.
- When searching for a matching column, the function checks for equality using the strict equality operator `===`. As a consequence, `NaN` values are considered distinct, and `-0` and `+0` are considered the same.

</section>

<!-- /.notes -->

<!-- Package usage examples. -->

<section class="examples">

## Examples
Expand All @@ -220,6 +225,7 @@ var Complex64Array = require( '@stdlib/array/complex64' );
var Uint8Array = require( '@stdlib/array/uint8' );
var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
var logEach = require( '@stdlib/console/log-each' );
var cindexOfColumn = require( '@stdlib/blas/ext/base/cindex-of-column' );

var shape = [ 2, 2 ];
Expand All @@ -230,7 +236,7 @@ var A = new Complex64Array( [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ] );
console.log( ndarray2array( A, shape, strides, 0, order ) );

var x = new Complex64Array( [ 2.0, 0.0, 4.0, 0.0 ] );
console.log( x );
logEach( '%s', x );

var workspace = new Uint8Array( shape[ 1 ] );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* limitations under the License.
*/

import Complex64Array = require( '@stdlib/array/complex64' );
import cindexOfColumn = require( './index' );


Expand Down Expand Up @@ -183,7 +184,7 @@ import cindexOfColumn = require( './index' );
cindexOfColumn( 'row-major', 2, 2, A, 2, x ); // $ExpectError
cindexOfColumn( 'row-major', 2, 2, A, 2, x, 1 ); // $ExpectError
cindexOfColumn( 'row-major', 2, 2, A, 2, x, 1, w ); // $ExpectError
cindexOfColumn( 'row-major', 2, 2, A, 2, x, 1, w, 1, 0 ); // $ExpectError
cindexOfColumn( 'row-major', 2, 2, A, 2, x, 1, w, 1, {} ); // $ExpectError
}

// Attached to main export is an `ndarray` method which returns a number...
Expand Down Expand Up @@ -399,5 +400,5 @@ import cindexOfColumn = require( './index' );
cindexOfColumn.ndarray( 2, 2, A, 2, 1, 0, x, 1, 0 ); // $ExpectError
cindexOfColumn.ndarray( 2, 2, A, 2, 1, 0, x, 1, 0, w ); // $ExpectError
cindexOfColumn.ndarray( 2, 2, A, 2, 1, 0, x, 1, 0, w, 1 ); // $ExpectError
cindexOfColumn.ndarray( 2, 2, A, 2, 1, 0, x, 1, 0, w, 1, 0, 0 ); // $ExpectError
cindexOfColumn.ndarray( 2, 2, A, 2, 1, 0, x, 1, 0, w, 1, 0, {} ); // $ExpectError
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var Complex64Array = require( '@stdlib/array/complex64' );
var Uint8Array = require( '@stdlib/array/uint8' );
var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
var logEach = require( '@stdlib/console/log-each' );
var cindexOfColumn = require( './../lib' );

var shape = [ 2, 2 ];
Expand All @@ -32,7 +33,7 @@ var A = new Complex64Array( [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ] );
console.log( ndarray2array( A, shape, strides, 0, order ) );

var x = new Complex64Array( [ 2.0, 0.0, 4.0, 0.0 ] );
console.log( x );
logEach( '%s', x );

var workspace = new Uint8Array( shape[ 1 ] );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function cindexOfColumn( order, M, N, A, LDA, x, strideX, workspace, strideW ) {
s = M;
}
if ( LDA < max( 1, s ) ) {
throw new RangeError( format( 'invalid argument. Fifth argument must be greater than or equal to max(1,%d). Value: `%d`.', max( 1, s ), LDA ) );
throw new RangeError( format( 'invalid argument. Fifth argument must be greater than or equal to max(1,%d). Value: `%d`.', s, LDA ) );
}
if ( isColumnMajor( order ) ) {
sa1 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function cindexOfColumn( order, M, N, A, LDA, x, strideX, workspace, strideW ) {
s = M;
}
if ( LDA < max( 1, s ) ) {
throw new RangeError( format( 'invalid argument. Fifth argument must be greater than or equal to max(1,%d). Value: `%d`.', max( 1, s ), LDA ) );
throw new RangeError( format( 'invalid argument. Fifth argument must be greater than or equal to max(1,%d). Value: `%d`.', s, LDA ) );
}
return addon( resolveOrder( order ), M, N, reinterpret( A, 0 ), LDA, reinterpret( x, 0 ), strideX, workspace, strideW ); // eslint-disable-line max-len
}
Expand Down
46 changes: 23 additions & 23 deletions lib/node_modules/@stdlib/blas/ext/base/cindex-of-column/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
/**
* Returns the index of the first column in a single-precision complex floating-point input matrix which has the same elements as a provided search vector.
*
* @param order storage layout
* @param M number of rows in `A`
* @param N number of columns in `A`
* @param A input matrix
* @param LDA stride length for the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
* @param X search vector
* @param strideX stride length for `X`
* @param workspace workspace array for tracking column match candidates
* @param strideW stride length for `workspace`
* @return column index
* @param order storage layout
* @param M number of rows in `A`
* @param N number of columns in `A`
* @param A input matrix
* @param LDA stride length for the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
* @param X search vector
* @param strideX stride length for `X`
* @param workspace workspace array for tracking column match candidates
* @param strideW stride length for `workspace`
* @return column index
*/
CBLAS_INT API_SUFFIX(stdlib_strided_cindex_of_column)( const CBLAS_LAYOUT order, const CBLAS_INT M, const CBLAS_INT N, const stdlib_complex64_t *A, const CBLAS_INT LDA, const stdlib_complex64_t *X, const CBLAS_INT strideX, uint8_t *workspace, const CBLAS_INT strideW ) {
CBLAS_INT sa1;
Expand All @@ -59,19 +59,19 @@ CBLAS_INT API_SUFFIX(stdlib_strided_cindex_of_column)( const CBLAS_LAYOUT order,
/**
* Returns the index of the first column in a single-precision complex floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* @param M number of rows in `A`
* @param N number of columns in `A`
* @param A input matrix
* @param strideA1 stride length for the first dimension of `A`
* @param strideA2 stride length for the second dimension of `A`
* @param offsetA starting index for `A`
* @param X search vector
* @param strideX stride length for `X`
* @param offsetX starting index for `X`
* @param workspace workspace array for tracking column match candidates
* @param strideW stride length for `workspace`
* @param offsetW starting index for `workspace`
* @return column index
* @param M number of rows in `A`
* @param N number of columns in `A`
* @param A input matrix
* @param strideA1 stride length for the first dimension of `A`
* @param strideA2 stride length for the second dimension of `A`
* @param offsetA starting index for `A`
* @param X search vector
* @param strideX stride length for `X`
* @param offsetX starting index for `X`
* @param workspace workspace array for tracking column match candidates
* @param strideW stride length for `workspace`
* @param offsetW starting index for `workspace`
* @return column index
*/
CBLAS_INT API_SUFFIX(stdlib_strided_cindex_of_column_ndarray)( const CBLAS_INT M, const CBLAS_INT N, const stdlib_complex64_t *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA, const stdlib_complex64_t *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, uint8_t *workspace, const CBLAS_INT strideW, const CBLAS_INT offsetW ) {
stdlib_complex64_t va;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ var idx = cindexOfFalsy.ndarray( 3, x, 1, x.length-3 );
## Notes

- A complex number is falsy when both its real and imaginary components are falsy.
- If unable to find a falsy element, both functions return `-1`.
- Both functions explicitly treat `NaN` values as falsy.

</section>
Expand Down Expand Up @@ -257,7 +256,6 @@ CBLAS_INT stdlib_strided_cindex_of_falsy_ndarray( const CBLAS_INT N, const stdli
### Notes

- A complex number is falsy when both its real and imaginary components are falsy.
- If unable to find a falsy element, both functions return `-1`.
- Both functions explicitly treat `NaN` values as falsy.

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
A complex number is falsy when both its real and imaginary components are
falsy.

The function treats `NaN` values as falsy.
The function explicitly treats `NaN` values as falsy.

Parameters
----------
Expand All @@ -34,10 +34,22 @@

Examples
--------
// Standard usage:
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 0.0, 0.0 ] );
> var idx = {{alias}}( x.length, x, 1 )
1

// Using `N` and stride parameters:
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 0.0, 0.0, 5.0, 6.0 ] );
> var idx = {{alias}}( 2, x, 2 )
1

// Using view offsets:
> var x0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 0.0, 0.0 ] );
> var x1 = new {{alias:@stdlib/array/complex64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
> var idx = {{alias}}( 2, x1, 2 )
1


{{alias}}.ndarray( N, x, strideX, offsetX )
Returns the index of the first falsy element in a single-precision complex
Expand All @@ -47,6 +59,11 @@
buffer, the offset parameter supports indexing semantics based on a
starting index.

A complex number is falsy when both its real and imaginary components are
falsy.

The function explicitly treats `NaN` values as falsy.

Parameters
----------
N: integer
Expand All @@ -68,10 +85,15 @@

Examples
--------
// Standard usage:
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 0.0, 0.0 ] );
> var idx = {{alias}}.ndarray( x.length, x, 1, 0 )
1

// Using an index offset:
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 0.0, 0.0 ] );
> var idx = {{alias}}.ndarray( 2, x, 2, 1 )
1

See Also
--------

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface Routine {
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param N - number of indexed elements
Expand All @@ -54,7 +54,7 @@ interface Routine {
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param N - number of indexed elements
Expand All @@ -80,7 +80,7 @@ interface Routine {
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param N - number of indexed elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy( false, x, 1 ); // $ExpectError
cindexOfFalsy( null, x, 1 ); // $ExpectError
cindexOfFalsy( {}, x, 1 ); // $ExpectError
cindexOfFalsy( ( x: number ): number => x, x, 1 ); // $ExpectError
}

// The compiler throws an error if the function is provided a second argument which is not a Complex64Array...
Expand All @@ -51,6 +52,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy( x.length, false, 1 ); // $ExpectError
cindexOfFalsy( x.length, null, 1 ); // $ExpectError
cindexOfFalsy( x.length, {}, 1 ); // $ExpectError
cindexOfFalsy( x.length, ( x: number ): number => x, 1 ); // $ExpectError
}

// The compiler throws an error if the function is provided a third argument which is not a number...
Expand All @@ -62,6 +64,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy( x.length, x, false ); // $ExpectError
cindexOfFalsy( x.length, x, null ); // $ExpectError
cindexOfFalsy( x.length, x, {} ); // $ExpectError
cindexOfFalsy( x.length, x, ( x: number ): number => x ); // $ExpectError
}

// The compiler throws an error if the function is provided an unsupported number of arguments...
Expand All @@ -88,6 +91,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy.ndarray( false, x, 1, 1 ); // $ExpectError
cindexOfFalsy.ndarray( null, x, 1, 1 ); // $ExpectError
cindexOfFalsy.ndarray( {}, x, 1, 1 ); // $ExpectError
cindexOfFalsy.ndarray( ( x: number ): number => x, x, 1, 1 ); // $ExpectError
}

// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Complex64Array...
Expand All @@ -99,6 +103,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy.ndarray( x.length, false, 1, 1 ); // $ExpectError
cindexOfFalsy.ndarray( x.length, null, 1, 1 ); // $ExpectError
cindexOfFalsy.ndarray( x.length, {}, 1, 1 ); // $ExpectError
cindexOfFalsy.ndarray( x.length, ( x: number ): number => x, 1, 1 ); // $ExpectError
}

// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
Expand All @@ -110,6 +115,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy.ndarray( x.length, x, false, 1 ); // $ExpectError
cindexOfFalsy.ndarray( x.length, x, null, 1 ); // $ExpectError
cindexOfFalsy.ndarray( x.length, x, {}, 1 ); // $ExpectError
cindexOfFalsy.ndarray( x.length, x, ( x: number ): number => x, 1 ); // $ExpectError
}

// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
Expand All @@ -121,6 +127,7 @@ import cindexOfFalsy = require( './index' );
cindexOfFalsy.ndarray( x.length, x, 1, false ); // $ExpectError
cindexOfFalsy.ndarray( x.length, x, 1, null ); // $ExpectError
cindexOfFalsy.ndarray( x.length, x, 1, {} ); // $ExpectError
cindexOfFalsy.ndarray( x.length, x, 1, ( x: number ): number => x ); // $ExpectError
}

// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var ndarray = require( './ndarray.js' );
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param {PositiveInteger} N - number of indexed elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var addon = require( './../src/addon.node' );
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param {PositiveInteger} N - number of indexed elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param {PositiveInteger} N - number of indexed elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );
var addon = require( './../src/addon.node' );

Check warning on line 24 in lib/node_modules/@stdlib/blas/ext/base/cindex-of-falsy/lib/ndarray.native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

only the `ndarray` property of the required module is used; require the property directly


// MAIN //
Expand All @@ -32,7 +32,7 @@
* ## Notes
*
* - A complex number is falsy when both its real and imaginary components are falsy.
* - If unable to find a falsy element, the function returns `-1`.
* - If the function is unable to find a falsy element, the function returns `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param {PositiveInteger} N - number of indexed elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
/**
* Returns the index of the first falsy element in a single-precision complex floating-point strided array.
*
* @param N number of indexed elements
* @param X input array
* @param strideX stride length
* @return index
* @param N number of indexed elements
* @param X input array
* @param strideX stride length
* @return index
*/
CBLAS_INT API_SUFFIX(stdlib_strided_cindex_of_falsy)( const CBLAS_INT N, const stdlib_complex64_t *X, const CBLAS_INT strideX ) {
CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
Expand All @@ -40,11 +40,11 @@ CBLAS_INT API_SUFFIX(stdlib_strided_cindex_of_falsy)( const CBLAS_INT N, const s
/**
* Returns the index of the first falsy element in a single-precision complex floating-point strided array using alternative indexing semantics.
*
* @param N number of indexed elements
* @param X input array
* @param strideX stride length
* @param offsetX starting index
* @return index
* @param N number of indexed elements
* @param X input array
* @param strideX stride length
* @param offsetX starting index
* @return index
*/
CBLAS_INT API_SUFFIX(stdlib_strided_cindex_of_falsy_ndarray)( const CBLAS_INT N, const stdlib_complex64_t *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
stdlib_complex64_t v;
Expand Down
Loading
Loading