Skip to content

Commit 2939f56

Browse files
committed
feat: add nditerStacks to namespace
1 parent 4289f78 commit 2939f56

File tree

27 files changed

+44
-15
lines changed

27 files changed

+44
-15
lines changed

Diff for: lib/node_modules/@stdlib/namespace/alias2pkg/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@ nditerMatrixEntries,"@stdlib/ndarray/iter/matrix-entries"
25652565
nditerRowEntries,"@stdlib/ndarray/iter/row-entries"
25662566
nditerRows,"@stdlib/ndarray/iter/rows"
25672567
nditerSelectDimension,"@stdlib/ndarray/iter/select-dimension"
2568+
nditerStacks,"@stdlib/ndarray/iter/stacks"
25682569
nditerSubarrays,"@stdlib/ndarray/iter/subarrays"
25692570
nditerValues,"@stdlib/ndarray/iter/values"
25702571
ndslice,"@stdlib/ndarray/slice"

Diff for: lib/node_modules/@stdlib/namespace/alias2pkg/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/alias2related/data/data.csv

+2-1
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,8 @@ nditerMatrixEntries,"nditerColumnEntries,nditerEntries,nditerMatrices,nditerRowE
25652565
nditerRowEntries,"nditerColumnEntries,nditerEntries,nditerRows,ndslice"
25662566
nditerRows,"nditerColumns,nditerRowEntries,ndslice"
25672567
nditerSelectDimension,"nditerColumns,nditerMatrices,nditerRows,ndslice"
2568-
nditerSubarrays,"nditerColumns,nditerMatrices,nditerRows,ndslice"
2568+
nditerStacks,"nditerColumns,nditerMatrices,nditerRows,nditerSubarrays,ndslice"
2569+
nditerSubarrays,"nditerColumns,nditerMatrices,nditerRows,nditerStacks,ndslice"
25692570
nditerValues,"ndarray,nditerEntries,nditerIndices"
25702571
ndslice,"array,ndat,ndarray,ndsliceAssign,ndsliceDimension"
25712572
ndsliceAssign,"array,ndarray,ndslice"

Diff for: lib/node_modules/@stdlib/namespace/alias2related/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/alias2standalone/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@ nditerMatrixEntries,"@stdlib/ndarray-iter-matrix-entries"
25652565
nditerRowEntries,"@stdlib/ndarray-iter-row-entries"
25662566
nditerRows,"@stdlib/ndarray-iter-rows"
25672567
nditerSelectDimension,"@stdlib/ndarray-iter-select-dimension"
2568+
nditerStacks,"@stdlib/ndarray-iter-stacks"
25682569
nditerSubarrays,"@stdlib/ndarray-iter-subarrays"
25692570
nditerValues,"@stdlib/ndarray-iter-values"
25702571
ndslice,"@stdlib/ndarray-slice"

Diff for: lib/node_modules/@stdlib/namespace/alias2standalone/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/aliases/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/aliases/data/data.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@ nditerMatrixEntries
25652565
nditerRowEntries
25662566
nditerRows
25672567
nditerSelectDimension
2568+
nditerStacks
25682569
nditerSubarrays
25692570
nditerValues
25702571
ndslice

Diff for: lib/node_modules/@stdlib/namespace/lib/namespace/n.js

+16
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,21 @@ ns.push({
516516
]
517517
});
518518

519+
ns.push({
520+
'alias': 'nditerStacks',
521+
'path': '@stdlib/ndarray/iter/stacks',
522+
'value': require( '@stdlib/ndarray/iter/stacks' ),
523+
'type': 'Function',
524+
'related': [
525+
'@stdlib/ndarray/iter/columns',
526+
'@stdlib/ndarray/iter/matrices',
527+
'@stdlib/ndarray/iter/rows',
528+
'@stdlib/ndarray/iter/stack-entries',
529+
'@stdlib/ndarray/iter/subarrays',
530+
'@stdlib/ndarray/slice'
531+
]
532+
});
533+
519534
ns.push({
520535
'alias': 'nditerSubarrays',
521536
'path': '@stdlib/ndarray/iter/subarrays',
@@ -525,6 +540,7 @@ ns.push({
525540
'@stdlib/ndarray/iter/columns',
526541
'@stdlib/ndarray/iter/matrices',
527542
'@stdlib/ndarray/iter/rows',
543+
'@stdlib/ndarray/iter/stacks',
528544
'@stdlib/ndarray/iter/subarray-entries',
529545
'@stdlib/ndarray/slice'
530546
]

Diff for: lib/node_modules/@stdlib/namespace/pkg2alias/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@
25652565
"@stdlib/ndarray/iter/row-entries",nditerRowEntries
25662566
"@stdlib/ndarray/iter/rows",nditerRows
25672567
"@stdlib/ndarray/iter/select-dimension",nditerSelectDimension
2568+
"@stdlib/ndarray/iter/stacks",nditerStacks
25682569
"@stdlib/ndarray/iter/subarrays",nditerSubarrays
25692570
"@stdlib/ndarray/iter/values",nditerValues
25702571
"@stdlib/ndarray/slice",ndslice

Diff for: lib/node_modules/@stdlib/namespace/pkg2alias/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/pkg2related/data/data.csv

+2-1
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,8 @@
25652565
"@stdlib/ndarray/iter/row-entries","@stdlib/ndarray/iter/column-entries,@stdlib/ndarray/iter/entries,@stdlib/ndarray/iter/rows,@stdlib/ndarray/slice"
25662566
"@stdlib/ndarray/iter/rows","@stdlib/ndarray/iter/columns,@stdlib/ndarray/iter/row-entries,@stdlib/ndarray/slice"
25672567
"@stdlib/ndarray/iter/select-dimension","@stdlib/ndarray/iter/columns,@stdlib/ndarray/iter/matrices,@stdlib/ndarray/iter/rows,@stdlib/ndarray/slice"
2568-
"@stdlib/ndarray/iter/subarrays","@stdlib/ndarray/iter/columns,@stdlib/ndarray/iter/matrices,@stdlib/ndarray/iter/rows,@stdlib/ndarray/slice"
2568+
"@stdlib/ndarray/iter/stacks","@stdlib/ndarray/iter/columns,@stdlib/ndarray/iter/matrices,@stdlib/ndarray/iter/rows,@stdlib/ndarray/iter/subarrays,@stdlib/ndarray/slice"
2569+
"@stdlib/ndarray/iter/subarrays","@stdlib/ndarray/iter/columns,@stdlib/ndarray/iter/matrices,@stdlib/ndarray/iter/rows,@stdlib/ndarray/iter/stacks,@stdlib/ndarray/slice"
25692570
"@stdlib/ndarray/iter/values","@stdlib/ndarray/ctor,@stdlib/ndarray/iter/entries,@stdlib/ndarray/iter/indices"
25702571
"@stdlib/ndarray/slice","@stdlib/ndarray/array,@stdlib/ndarray/at,@stdlib/ndarray/ctor,@stdlib/ndarray/slice-assign,@stdlib/ndarray/slice-dimension"
25712572
"@stdlib/ndarray/slice-assign","@stdlib/ndarray/array,@stdlib/ndarray/ctor,@stdlib/ndarray/slice"

Diff for: lib/node_modules/@stdlib/namespace/pkg2related/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/pkg2standalone/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@
25652565
"@stdlib/ndarray/iter/row-entries","@stdlib/ndarray-iter-row-entries"
25662566
"@stdlib/ndarray/iter/rows","@stdlib/ndarray-iter-rows"
25672567
"@stdlib/ndarray/iter/select-dimension","@stdlib/ndarray-iter-select-dimension"
2568+
"@stdlib/ndarray/iter/stacks","@stdlib/ndarray-iter-stacks"
25682569
"@stdlib/ndarray/iter/subarrays","@stdlib/ndarray-iter-subarrays"
25692570
"@stdlib/ndarray/iter/values","@stdlib/ndarray-iter-values"
25702571
"@stdlib/ndarray/slice","@stdlib/ndarray-slice"

Diff for: lib/node_modules/@stdlib/namespace/pkg2standalone/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/namespace/standalone2pkg/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,7 @@
25652565
"@stdlib/ndarray-iter-row-entries","@stdlib/ndarray/iter/row-entries"
25662566
"@stdlib/ndarray-iter-rows","@stdlib/ndarray/iter/rows"
25672567
"@stdlib/ndarray-iter-select-dimension","@stdlib/ndarray/iter/select-dimension"
2568+
"@stdlib/ndarray-iter-stacks","@stdlib/ndarray/iter/stacks"
25682569
"@stdlib/ndarray-iter-subarrays","@stdlib/ndarray/iter/subarrays"
25692570
"@stdlib/ndarray-iter-values","@stdlib/ndarray/iter/values"
25702571
"@stdlib/ndarray-slice","@stdlib/ndarray/slice"

Diff for: lib/node_modules/@stdlib/namespace/standalone2pkg/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/repl/code-blocks/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -4126,6 +4126,7 @@ nditerMatrixEntries,"var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ] ] );\nvar it = ndit
41264126
nditerRowEntries,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\nvar it = nditerRowEntries( x );\nvar v = it.next().value;\nv[ 0 ]\nndarray2array( v[ 1 ] )\nv = it.next().value;\nv[ 0 ]\nndarray2array( v[ 1 ] )\n"
41274127
nditerRows,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\nvar it = nditerRows( x );\nvar v = it.next().value;\nndarray2array( v )\nv = it.next().value;\nndarray2array( v )\n"
41284128
nditerSelectDimension,"var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ] ] );\nvar it = nditerSelectDimension( x, 0 );\nvar v = it.next().value;\nndarray2array( v )\n"
4129+
nditerSubarrays,"var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ] ] );\nvar it = nditerSubarrays( x, 2 );\nvar v = it.next().value;\nndarray2array( v )\n"
41294130
nditerValues,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\nvar it = nditerValues( x );\nvar v = it.next().value\nv = it.next().value\n"
41304131
ndslice,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] )\nx.shape\nvar s = new MultiSlice( null, 1 )\nvar y = ndslice( x, s )\ny.shape\nndarray2array( y )\n"
41314132
ndsliceAssign,"var y = ndzeros( [ 2, 2 ] )\nvar x = scalar2ndarray( 3.0 )\nvar s = new MultiSlice( null, 1 )\nvar out = ndsliceAssign( x, y, s )\nvar bool = ( out === y )\nndarray2array( y )\n"

Diff for: lib/node_modules/@stdlib/repl/code-blocks/data/data.json

+1-1
Large diffs are not rendered by default.

Diff for: lib/node_modules/@stdlib/repl/help/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -4127,6 +4127,7 @@ nditerMatrixEntries,"\nnditerMatrixEntries( x[, options] )\n Returns an itera
41274127
nditerRowEntries,"\nnditerRowEntries( x[, options] )\n Returns an iterator which returns [index, row] pairs for each row in a\n matrix (or stack of matrices).\n\n Each returned index is a Cartesian index (i.e., an array of subscripts/\n dimension indices). A dimension index equal to `null` indicates that all\n values along the respective dimension are included in the returned ndarray.\n\n If an environment supports Symbol.iterator, the returned iterator is\n iterable.\n\n If an environment supports Symbol.iterator, the function explicitly does not\n invoke an ndarray's `@@iterator` method, regardless of whether this method\n is defined.\n\n Parameters\n ----------\n x: ndarray\n Input array.\n\n options: Object (optional)\n Options.\n\n options.readonly: boolean (optional)\n Boolean indicating whether returned ndarray views should be read-only.\n If the input ndarray is read-only, setting this option to `false` raises\n an exception. Default: true.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n > var it = nditerRowEntries( x );\n > var v = it.next().value;\n > v[ 0 ]\n [ 0, null ]\n > ndarray2array( v[ 1 ] )\n [ 1, 2 ]\n > v = it.next().value;\n > v[ 0 ]\n [ 1, null ]\n > ndarray2array( v[ 1 ] )\n [ 3, 4 ]\n\n See Also\n --------\n nditerColumnEntries, nditerEntries, nditerRows, ndslice\n"
41284128
nditerRows,"\nnditerRows( x[, options] )\n Returns an iterator which iterates over each row in a matrix (or stack of\n matrices).\n\n If an environment supports Symbol.iterator, the returned iterator is\n iterable.\n\n If an environment supports Symbol.iterator, the function explicitly does not\n invoke an ndarray's `@@iterator` method, regardless of whether this method\n is defined.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray for which to create the iterator.\n\n options: Object (optional)\n Options.\n\n options.readonly: boolean (optional)\n Boolean indicating whether returned ndarray views should be read-only.\n If the input ndarray is read-only, setting this option to `false` raises\n an exception. Default: true.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n > var it = nditerRows( x );\n > var v = it.next().value;\n > ndarray2array( v )\n [ 1, 2 ]\n > v = it.next().value;\n > ndarray2array( v )\n [ 3, 4 ]\n\n See Also\n --------\n nditerColumns, nditerRowEntries, ndslice\n"
41294129
nditerSelectDimension,"\nnditerSelectDimension( x, dim[, options] )\n Returns an iterator which iterates over each view along a specified\n dimension.\n\n If an environment supports Symbol.iterator, the returned iterator is\n iterable.\n\n If an environment supports Symbol.iterator, the function explicitly does not\n invoke an ndarray's `@@iterator` method, regardless of whether this method\n is defined.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray for which to create the iterator.\n\n dim: integer\n Dimension index. If less than zero, the index is resolved relative to\n the last dimension, with the last dimension corresponding to the value\n `-1`.\n\n options: Object (optional)\n Options.\n\n options.readonly: boolean (optional)\n Boolean indicating whether returned ndarray views should be read-only.\n If the input ndarray is read-only, setting this option to `false` raises\n an exception. Default: true.\n\n options.keepdim: boolean (optional)\n Boolean indicating whether returned views should include the selected\n dimension as a singleton dimension. Including the selected dimension as\n a singleton dimension can be useful when wanting to ensure that returned\n views remain broadcast compatible with the input ndarray. Default:\n false.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ] ] );\n > var it = nditerSelectDimension( x, 0 );\n > var v = it.next().value;\n > ndarray2array( v )\n [ [ 1, 2 ], [ 3, 4 ] ]\n\n See Also\n --------\n nditerColumns, nditerMatrices, nditerRows, ndslice\n"
4130+
nditerStacks,"\nnditerStacks( x, dims[, options] )\n Returns an iterator which iterates over each subarray in a stack of\n subarrays according to a list of specified stack dimensions.\n\n If an environment supports Symbol.iterator, the returned iterator is\n iterable.\n\n If an environment supports Symbol.iterator, the function explicitly does not\n invoke an ndarray's `@@iterator` method, regardless of whether this method\n is defined.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray for which to create the iterator. Must have at least\n `dims.length+1` dimensions.\n\n dims: Array<integer>\n Indices of dimensions to stack. If a dimension index is less than zero,\n the index is resolved relative to the last dimension, with the last\n dimension corresponding to the value `-1`. The list of indices must be\n unique and resolve to dimension indices sorted in ascending order.\n\n options: Object (optional)\n Options.\n\n options.readonly: boolean (optional)\n Boolean indicating whether returned ndarray views should be read-only.\n If the input ndarray is read-only, setting this option to `false` raises\n an exception. Default: true.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ] ] );\n > var it = nditerStacks( x, [ 1, 2 ] );\n > var v = it.next().value;\n > ndarray2array( v )\n [ [ 1, 2 ], [ 3, 4 ] ]\n\n See Also\n --------\n nditerColumns, nditerMatrices, nditerRows, nditerSubarrays, ndslice\n"
41304131
nditerSubarrays,"\nnditerSubarrays( x, ndims[, options] )\n Returns an iterator which iterates over each subarray in a stack of\n subarrays.\n\n If an environment supports Symbol.iterator, the returned iterator is\n iterable.\n\n If an environment supports Symbol.iterator, the function explicitly does not\n invoke an ndarray's `@@iterator` method, regardless of whether this method\n is defined.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray for which to create the iterator. Must have at least\n `ndims+1` dimensions.\n\n ndims: integer\n Number of dimensions to stack.\n\n options: Object (optional)\n Options.\n\n options.readonly: boolean (optional)\n Boolean indicating whether returned ndarray views should be read-only.\n If the input ndarray is read-only, setting this option to `false` raises\n an exception. Default: true.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ] ] );\n > var it = nditerSubarrays( x, 2 );\n > var v = it.next().value;\n > ndarray2array( v )\n [ [ 1, 2 ], [ 3, 4 ] ]\n\n See Also\n --------\n nditerColumns, nditerMatrices, nditerRows, ndslice\n"
41314132
nditerValues,"\nnditerValues( x[, options] )\n Returns an iterator which returns individual elements from a provided\n ndarray.\n\n If an environment supports Symbol.iterator, the returned iterator is\n iterable.\n\n If an environment supports Symbol.iterator, the function explicitly does not\n invoke an ndarray's `@@iterator` method, regardless of whether this method\n is defined.\n\n Parameters\n ----------\n x: ndarray\n Input array.\n\n options: Object (optional)\n Options.\n\n options.order: string (optional)\n Index iteration order. By default, the returned iterator returns values\n according to the layout order of the provided array. Accordingly, for\n row-major input arrays, the last dimension indices increment fastest.\n For column-major input arrays, the first dimension indices increment\n fastest. To override the inferred order and ensure that indices\n increment in a specific manor, regardless of the input array's layout\n order, explicitly set the iteration order. Note, however, that iterating\n according to an order which does not match that of the input array may,\n in some circumstances, result in performance degradation due to cache\n misses. Must be either 'row-major' or 'column-major'.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n > var it = nditerValues( x );\n > var v = it.next().value\n 1\n > v = it.next().value\n 2\n\n See Also\n --------\n ndarray, nditerEntries, nditerIndices\n"
41324133
ndslice,"\nndslice( x, ...s[, options] )\n Returns a read-only view of an input ndarray.\n\n The function supports three (mutually exclusive) means of providing slice\n arguments:\n\n 1. Providing a single MultiSlice object.\n 2. Providing a single array containing slice arguments.\n 3. Providing slice arguments as separate arguments.\n\n An individual slice argument must be either a Slice, an integer, null, or\n undefined.\n\n In all cases, the number of slice dimensions must match the number of array\n dimensions.\n\n If providing a MultiSlice object or an array of slice arguments, no other\n slice arguments should be provided.\n\n Mixing function invocation styles (e.g., providing multiple MultiSlice\n objects or providing an array of slice arguments followed by additional\n slice arguments) is not supported.\n\n Parameters\n ----------\n x: ndarray\n Input array.\n\n s: ...MultiSlice|Slice|null|undefined|integer|ArrayLike\n Slice arguments.\n\n options: Object (optional)\n Options.\n\n options.strict: boolean (optional)\n Boolean indicating whether to enforce strict bounds checking.\n Default: true.\n\n Returns\n -------\n out: ndarray\n Output array view.\n\n Examples\n --------\n > var x = array( [ [ 1, 2 ], [ 3, 4 ] ] )\n <ndarray>\n > x.shape\n [ 2, 2 ]\n > var s = new MultiSlice( null, 1 )\n <MultiSlice>\n > var y = ndslice( x, s )\n <ndarray>\n > y.shape\n [ 2 ]\n > ndarray2array( y )\n [ 2, 4 ]\n\n See Also\n --------\n array, ndat, ndarray, ndsliceAssign, ndsliceDimension\n"

Diff for: lib/node_modules/@stdlib/repl/help/data/data.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)