Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ import gcopyWithin = require( '@stdlib/blas/ext/base/ndarray/gcopy-within' );
import gcuany = require( '@stdlib/blas/ext/base/ndarray/gcuany' );
import gcuevery = require( '@stdlib/blas/ext/base/ndarray/gcuevery' );
import gcunone = require( '@stdlib/blas/ext/base/ndarray/gcunone' );
import gcusome = require( '@stdlib/blas/ext/base/ndarray/gcusome' );
import gcusum = require( '@stdlib/blas/ext/base/ndarray/gcusum' );
import gcusumkbn = require( '@stdlib/blas/ext/base/ndarray/gcusumkbn' );
import gcusumkbn2 = require( '@stdlib/blas/ext/base/ndarray/gcusumkbn2' );
Expand All @@ -132,6 +133,7 @@ import gfillLessThan = require( '@stdlib/blas/ext/base/ndarray/gfill-less-than'
import gfillNaN = require( '@stdlib/blas/ext/base/ndarray/gfill-nan' );
import gfillNotEqual = require( '@stdlib/blas/ext/base/ndarray/gfill-not-equal' );
import gfindIndex = require( '@stdlib/blas/ext/base/ndarray/gfind-index' );
import gfindIndexBetween = require( '@stdlib/blas/ext/base/ndarray/gfind-index-between' );
import gfindLastIndex = require( '@stdlib/blas/ext/base/ndarray/gfind-last-index' );
import gfirstIndexEqual = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-equal' );
import gfirstIndexGreaterThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-greater-than' );
Expand Down Expand Up @@ -3217,6 +3219,38 @@ interface Namespace {
*/
gcunone: typeof gcunone;

/**
* Cumulatively tests whether at least `k` elements in a one-dimensional ndarray are truthy.
*
* ## Notes
*
* - The function expects the following ndarrays:
*
* - a one-dimensional input ndarray.
* - a one-dimensional output ndarray.
* - a zero-dimensional ndarray containing the minimum number of truthy elements.
*
* @param arrays - array-like object containing ndarrays
* @returns output ndarray
*
* @example
* var vector = require( '@stdlib/ndarray/vector/ctor' );
* var BooleanVector = require( '@stdlib/ndarray/vector/bool' );
* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
*
* var x = vector( [ 0.0, 1.0, 1.0, 0.0 ], 'generic' );
* var out = new BooleanVector( 4 );
*
* var k = scalar2ndarray( 2 );
*
* var z = ns.gcusome( [ x, out, k ] );
* // returns <ndarray>[ false, false, true, true ]
*
* var bool = ( z === out );
* // returns true
*/
gcusome: typeof gcusome;

/**
* Computes the cumulative sum of a one-dimensional ndarray.
*
Expand Down Expand Up @@ -3793,6 +3827,47 @@ interface Namespace {
*/
gfindIndex: typeof gfindIndex;

/**
* Returns the index of the first element in a one-dimensional ndarray which passes a test implemented by a predicate function within a specified range.
*
* ## Notes
*
* - The function expects the following ndarrays:
*
* - a one-dimensional input ndarray.
* - a zero-dimensional ndarray containing the index from which to begin searching.
* - a zero-dimensional ndarray containing the index at which to stop searching (exclusive).
*
* - If no element passes a test implemented by a predicate function, the function returns `-1`.
*
* @param arrays - array-like object containing ndarrays
* @param clbk - predicate function
* @param thisArg - predicate function execution context
* @returns index
*
* @example
* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
* var vector = require( '@stdlib/ndarray/vector/ctor' );
*
* function clbk( v ) {
* return v % 2.0 === 0.0;
* }
*
* var x = vector( [ 2.0, 1.0, 3.0, 4.0, 5.0 ], 'generic' );
*
* var fromIndex = scalar2ndarray( 1, {
* 'dtype': 'generic'
* });
*
* var toIndex = scalar2ndarray( 4, {
* 'dtype': 'generic'
* });
*
* var v = ns.gfindIndexBetween( [ x, fromIndex, toIndex ], clbk );
* // returns 3
*/
gfindIndexBetween: typeof gfindIndexBetween;

/**
* Returns the index of the last element in a one-dimensional ndarray which passes a test implemented by a predicate function.
*
Expand Down
Loading