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
104 changes: 93 additions & 11 deletions lib/node_modules/@stdlib/blas/ext/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
/* eslint-disable max-lines */

import base = require( '@stdlib/blas/ext/base' );
import circshift = require( '@stdlib/blas/ext/circshift' );
import cusum = require( '@stdlib/blas/ext/cusum' );
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 join = require( '@stdlib/blas/ext/join' );
import lastIndexOf = require( '@stdlib/blas/ext/last-index-of' );
import linspace = require( '@stdlib/blas/ext/linspace' );
import sorthp = require( '@stdlib/blas/ext/sorthp' );
import sum = require( '@stdlib/blas/ext/sum' );
import toSortedhp = require( '@stdlib/blas/ext/to-sortedhp' );
import zeroTo = require( '@stdlib/blas/ext/zero-to' );

/**
* Interface describing the `ext` namespace.
Expand All @@ -40,6 +43,35 @@ interface Namespace {
*/
base: typeof base;

/**
* Circularly shifts the elements of an input ndarray by a specified number of positions along one or more ndarray dimensions.
*
* ## Notes
*
* - The input ndarray is shifted **in-place** (i.e., the input ndarray is **mutated**).
* - When shifting elements along a single dimension, a positive `k` shifts elements to the right (toward higher indices), and a negative `k` shifts elements to the left (toward lower indices). If `k` is zero, the input ndarray is left unchanged.
*
* @param x - input ndarray
* @param k - number of positions to shift
* @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 ], {
* 'shape': [ 2, 2 ],
* 'order': 'row-major'
* });
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
*
* var y = ns.circshift( x, 1, {
* 'dims': [ 0 ]
* });
* // returns <ndarray>[ [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]
*/
circshift: typeof circshift;

/**
* Computes the cumulative sum along one or more ndarray dimensions.
*
Expand Down Expand Up @@ -215,6 +247,40 @@ interface Namespace {
*/
indexOf: typeof indexOf;

/**
* Returns an ndarray created by joining elements using a separator along one or more ndarray dimensions.
*
* @param x - input ndarray
* @param options - function options
* @returns output ndarray
*
* @example
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 2.0, 3.0 ] );
*
* var y = ns.join( x );
* // returns <ndarray>[ '1,2,3' ]
*
* @example
* var empty = require( '@stdlib/ndarray/empty' );
* var array = require( '@stdlib/ndarray/array' );
*
* var x = array( [ 1.0, 2.0, 3.0 ], {
* 'dtype': 'generic'
* });
* var y = empty( [], {
* 'dtype': 'generic'
* });
*
* var out = ns.join.assign( x, y );
* // returns <ndarray>[ '1,2,3' ]
*
* var bool = ( out === y );
* // returns true
*/
join: typeof join;

/**
* Returns the last index of a specified search element along an ndarray dimension.
*
Expand Down Expand Up @@ -270,29 +336,20 @@ interface Namespace {
* @param options - function options
*
* @example
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
*
* var out = ns.linspace( [ 2, 4 ], 0.0, 3.0 );
* // returns <ndarray>
*
* var arr = ndarray2array( out );
* // returns [ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ]
* // returns <ndarray>[ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ]
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
*
* var x = zeros( [ 2, 4 ] );
* // returns <ndarray>
*
* var out = ns.linspace.assign( x, 0.0, 3.0 );
* // returns <ndarray>
* // returns <ndarray>[ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ]
*
* var bool = ( out === x );
* // returns true
*
* var arr = ndarray2array( out );
* // returns [ [ 0.0, 1.0, 2.0, 3.0 ], [ 0.0, 1.0, 2.0, 3.0 ] ]
*/
linspace: typeof linspace;

Expand Down Expand Up @@ -422,6 +479,31 @@ interface Namespace {
* // returns true
*/
toSortedhp: typeof toSortedhp;

/**
* Returns a new ndarray filled with linearly spaced numeric elements which increment by 1 starting from zero along one or more ndarray dimensions.
*
* @param shape - array shape
* @param options - function options
* @returns output ndarray
*
* @example
* var out = ns.zeroTo( [ 2, 3 ] );
* // returns <ndarray>[ [ 0.0, 1.0, 2.0 ], [ 0.0, 1.0, 2.0 ] ]
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var x = zeros( [ 2, 3 ] );
* // returns <ndarray>[ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ] ]
*
* var out = ns.zeroTo.assign( x );
* // returns <ndarray>[ [ 0.0, 1.0, 2.0 ], [ 0.0, 1.0, 2.0 ] ]
*
* var bool = ( out === x );
* // returns true
*/
zeroTo: typeof zeroTo;
}

/**
Expand Down