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
279 changes: 279 additions & 0 deletions lib/node_modules/@stdlib/blas/ext/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
import base = require( '@stdlib/blas/ext/base' );
import circshift = require( '@stdlib/blas/ext/circshift' );
import copyWithin = require( '@stdlib/blas/ext/copy-within' );
import cuany = require( '@stdlib/blas/ext/cuany' );
import cuevery = require( '@stdlib/blas/ext/cuevery' );
import cunone = require( '@stdlib/blas/ext/cunone' );
import cusum = require( '@stdlib/blas/ext/cusum' );
import fillRange = require( '@stdlib/blas/ext/fill-range' );
import findIndex = require( '@stdlib/blas/ext/find-index' );
import findLastIndex = require( '@stdlib/blas/ext/find-last-index' );
import indexOf = require( '@stdlib/blas/ext/index-of' );
import indexOfFalsy = require( '@stdlib/blas/ext/index-of-falsy' );
import indexOfNotEqual = require( '@stdlib/blas/ext/index-of-not-equal' );
import join = require( '@stdlib/blas/ext/join' );
import lastIndexOf = require( '@stdlib/blas/ext/last-index-of' );
import lastIndexOfFalsy = require( '@stdlib/blas/ext/last-index-of-falsy' );
import lastIndexOfTruthy = require( '@stdlib/blas/ext/last-index-of-truthy' );
import linspace = require( '@stdlib/blas/ext/linspace' );
import logspace = require( '@stdlib/blas/ext/logspace' );
import oneTo = require( '@stdlib/blas/ext/one-to' );
Expand Down Expand Up @@ -106,6 +114,96 @@ interface Namespace {
*/
copyWithin: typeof copyWithin;

/**
* Cumulatively tests whether at least one element along one or more ndarray dimensions is truthy.
*
* @param x - input ndarray
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 0.0, 0.0, 1.0, 0.0 ] );
*
* var y = ns.cuany( x );
* // returns <ndarray>[ false, false, true, true ]
*
* @example
* var falses = require( '@stdlib/ndarray/falses' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 0.0, 0.0, 1.0, 0.0 ] );
* var y = falses( [ 4 ] );
*
* var out = ns.cuany.assign( x, y );
* // returns <ndarray>[ false, false, true, true ]
*
* var bool = ( out === y );
* // returns true
*/
cuany: typeof cuany;

/**
* Cumulatively tests whether every element along one or more ndarray dimensions is truthy.
*
* @param x - input ndarray
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 1.0, 0.0, 1.0 ] );
*
* var y = ns.cuevery( x );
* // returns <ndarray>[ true, true, false, false ]
*
* @example
* var trues = require( '@stdlib/ndarray/trues' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 1.0, 0.0, 1.0 ] );
* var y = trues( [ 4 ] );
*
* var out = ns.cuevery.assign( x, y );
* // returns <ndarray>[ true, true, false, false ]
*
* var bool = ( out === y );
* // returns true
*/
cuevery: typeof cuevery;

/**
* Cumulatively tests whether every element along one or more ndarray dimensions is falsy.
*
* @param x - input ndarray
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 0.0, 0.0, 1.0, 0.0 ] );
*
* var y = ns.cunone( x );
* // returns <ndarray>[ true, true, false, false ]
*
* @example
* var falses = require( '@stdlib/ndarray/falses' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 0.0, 0.0, 1.0, 0.0 ] );
* var y = falses( [ 4 ] );
*
* var out = ns.cunone.assign( x, y );
* // returns <ndarray>[ true, true, false, false ]
*
* var bool = ( out === y );
* // returns true
*/
cunone: typeof cunone;

/**
* Computes the cumulative sum along one or more ndarray dimensions.
*
Expand Down Expand Up @@ -136,6 +234,34 @@ interface Namespace {
*/
cusum: typeof cusum;

/**
* Fills an input ndarray with a specified value along an ndarray dimension.
*
* ## Notes
*
* - The input ndarray is filled **in-place** (i.e., the input ndarray is **mutated**).
* - When a `start` and/or `end` index is negative, the respective index is determined relative to the last indexed element, with out-of-bounds indices clamped to index bounds.
*
* @param x - input ndarray
* @param value - fill value
* @param start - starting index (inclusive)
* @param end - ending index (exclusive)
* @param options - function options
* @returns input ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
*
* var y = ns.fillRange( x, 10.0, 1, 4 );
* // returns <ndarray>[ 1.0, 10.0, 10.0, 10.0, 5.0, 6.0 ]
*
* var bool = ( x === y );
* // returns true
*/
fillRange: typeof fillRange;

/**
* Returns the index of the first element along an ndarray dimension which passes a test implemented by a predicate function.
*
Expand Down Expand Up @@ -271,6 +397,83 @@ interface Namespace {
*/
indexOf: typeof indexOf;

/**
* Returns the index of the first falsy element along an ndarray dimension.
*
* ## Notes
*
* - If unable to find a falsy element along an ndarray dimension, the corresponding element in the returned ndarray is `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param x - input ndarray
* @param fromIndex - index from which to begin searching
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 3.0, 0.0, 2.0 ] );
*
* var y = ns.indexOfFalsy( x, 0 );
* // returns <ndarray>[ 2 ]
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 3.0, 0.0, 2.0, 0.0, 4.0 ] );
* var y = zeros( [], {
* 'dtype': 'int32'
* } );
*
* var out = ns.indexOfFalsy.assign( x, 3, y );
* // returns <ndarray>[ 4 ]
*
* var bool = ( out === y );
* // returns true
*/
indexOfFalsy: typeof indexOfFalsy;

/**
* Returns the first index of an element which is not equal to a specified search element along an ndarray dimension.
*
* ## Notes
*
* - When searching for a search element, the function checks for inequality using the strict inequality operator `!==`. As a consequence, `NaN` values are considered distinct from all values (including other `NaN` values), and `-0` and `+0` are considered the same.
* - If unable to find an element which is not equal to a specified search element along an ndarray dimension, the corresponding element in the returned ndarray is `-1`.
*
* @param x - input ndarray
* @param searchElement - search element
* @param fromIndex - index from which to begin searching
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 1.0, 3.0 ] );
*
* var y = ns.indexOfNotEqual( x, 1.0, 0 );
* // returns <ndarray>[ 2 ]
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 2.0, 1.0, 1.0, 3.0, 1.0 ] );
* var y = zeros( [], {
* 'dtype': 'int32'
* } );
*
* var out = ns.indexOfNotEqual.assign( x, 1.0, 2, y );
* // returns <ndarray>[ 4 ]
*
* var bool = ( out === y );
* // returns true
*/
indexOfNotEqual: typeof indexOfNotEqual;

/**
* Returns an ndarray created by joining elements using a separator along one or more ndarray dimensions.
*
Expand Down Expand Up @@ -344,6 +547,82 @@ interface Namespace {
*/
lastIndexOf: typeof lastIndexOf;

/**
* Returns the index of the last falsy element along an ndarray dimension.
*
* ## Notes
*
* - If unable to find a falsy element along an ndarray dimension, the corresponding element in the returned ndarray is `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param x - input ndarray
* @param fromIndex - index from which to begin searching
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 3.0, 0.0, 2.0 ] );
*
* var y = ns.lastIndexOfFalsy( x, -1 );
* // returns <ndarray>[ 2 ]
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 3.0, 0.0, 2.0, 0.0, 6.0 ] );
* var y = zeros( [], {
* 'dtype': 'int32'
* } );
*
* var out = ns.lastIndexOfFalsy.assign( x, 3, y );
* // returns <ndarray>[ 2 ]
*
* var bool = ( out === y );
* // returns true
*/
lastIndexOfFalsy: typeof lastIndexOfFalsy;

/**
* Returns the index of the last truthy element along an ndarray dimension.
*
* ## Notes
*
* - If unable to find a truthy element along an ndarray dimension, the corresponding element in the returned ndarray is `-1`.
* - The function explicitly treats `NaN` values as falsy.
*
* @param x - input ndarray
* @param fromIndex - index from which to begin searching
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 0.0, 0.0, 1.0, 0.0 ] );
*
* var y = ns.lastIndexOfTruthy( x, -1 );
* // returns <ndarray>[ 2 ]
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 0.0, 0.0, 1.0, 0.0, 3.0, 0.0 ] );
* var y = zeros( [], {
* 'dtype': 'int32'
* } );
*
* var out = ns.lastIndexOfTruthy.assign( x, 3, y );
* // returns <ndarray>[ 2 ]
*
* var bool = ( out === y );
* // returns true
*/
lastIndexOfTruthy: typeof lastIndexOfTruthy;

/**
* Returns a new ndarray filled with linearly spaced values over a specified interval along one or more ndarray dimensions.
*
Expand Down
Loading