diff --git a/.github/workflows/test_published_package.yml b/.github/workflows/test_published_package.yml
new file mode 100644
index 00000000..efe7ce77
--- /dev/null
+++ b/.github/workflows/test_published_package.yml
@@ -0,0 +1,105 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# Workflow name:
+name: test_published_package
+
+# Workflow triggers:
+on:
+ # Run workflow on a weekly schedule:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ - cron: '31 19 * * 0'
+
+ # Run workflow upon completion of `publish` workflow run:
+ workflow_run:
+ workflows: ["publish"]
+ types: [completed]
+
+ # Allow workflow to be manually run:
+ workflow_dispatch:
+
+# Workflow jobs:
+jobs:
+ test-published:
+ # Define a display name:
+ name: 'Test running examples of published package'
+
+ # Define the type of virtual host machine:
+ runs-on: ubuntu-latest
+
+ # Define environment variables:
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+
+ # Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
+ if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
+
+ # Define the job's steps:
+ steps:
+ # Checkout the repository:
+ - name: 'Checkout repository'
+ uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+
+ # Install Node.js:
+ - name: 'Install Node.js'
+ uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
+ with:
+ node-version: 20
+ timeout-minutes: 5
+
+ # Create test directory and run examples:
+ - name: 'Create test directory and run examples'
+ run: |
+ cd ..
+ mkdir test-published
+ cd test-published
+
+ # Copy example file:
+ cp $GITHUB_WORKSPACE/examples/index.js .
+
+ # Create a minimal package.json
+ echo '{
+ "name": "test-published",
+ "version": "1.0.0",
+ "main": "index.js",
+ "dependencies": {}
+ }' > package.json
+
+ # Get package name and modify example file:
+ PACKAGE_NAME=$(jq -r '.name' $GITHUB_WORKSPACE/package.json)
+ ESCAPED_PACKAGE_NAME=$(echo "$PACKAGE_NAME" | sed 's/[\/&]/\\&/g')
+
+ sed -i "s/require( '.\/..\/lib' )/require( '$ESCAPED_PACKAGE_NAME' )/g" index.js
+
+ # Extract and install dependencies:
+ DEPS=$(grep -oP "require\(\s*'([^']+)'\s*\)" index.js | sed "s/require(\s*'//" | sed "s/'\s*)//" | grep -v "^\.")
+ for dep in $DEPS; do
+ npm install $dep --save
+ done
+
+ # Run the example:
+ node index.js
+
+ # Send Slack notification if job fails:
+ - name: 'Send notification to Slack in case of failure'
+ uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
+ with:
+ status: ${{ job.status }}
+ channel: '#npm-ci'
+ if: failure()
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd7baf1b..254ef7b5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,196 @@
> Package changelog.
+
+
+## Unreleased (2024-11-20)
+
+
+
+### Packages
+
+
+
+#### [@stdlib/ndarray](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray)
+
+
+
+
+
+##### Features
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190)
+
+
+
+
+
+
+
+##### BREAKING CHANGES
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
+
+ - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments.
+
+
+
+
+
+
+
+
+
+
+
+
+
+#### [@stdlib/ndarray/base](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base)
+
+
+
+
+
+##### Features
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190)
+
+
+
+
+
+
+
+##### BREAKING CHANGES
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
+
+ - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments.
+
+
+
+
+
+
+
+
+
+
+
+
+
+#### [@stdlib/ndarray/base/assert](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert)
+
+
+
+
+
+##### Features
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190)
+
+
+
+
+
+
+
+##### BREAKING CHANGES
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
+
+ - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments.
+
+
+
+
+
+
+
+
+
+
+
+
+
+#### [@stdlib/ndarray/iter](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/iter)
+
+
+
+
+
+##### Features
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190)
+
+
+
+
+
+
+
+##### BREAKING CHANGES
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
+
+ - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### BREAKING CHANGES
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
+
+ - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments.
+
+
+
+
+
+
+
+### Contributors
+
+A total of 1 person contributed to this release. Thank you to this contributor:
+
+- Philipp Burckhardt
+
+
+
+
+
+
+
+### Commits
+
+
+
+- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - **feat:** update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190) _(by stdlib-bot, Philipp Burckhardt)_
+
+
+
+
+
+
+
+
+
+
+
## 0.3.3 (2024-11-05)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c9f811ce..f09b30e6 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -59,6 +59,7 @@ Mohammad Kaif <98884589+Kaif987@users.noreply.github.com>
Momtchil Momtchev
Muhammad Haris
Naresh Jagadeesan
+Neeraj Pathak
NightKnight
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
@@ -69,6 +70,7 @@ Prajwal Kulkarni
Pranav Goswami
Praneki <97080887+PraneGIT@users.noreply.github.com>
Pratik <97464067+Pratik772846@users.noreply.github.com>
+Pratyush Kumar Chouhan
Priyansh <88396544+itsspriyansh@users.noreply.github.com>
Pushpendra Chandravanshi
RISHAV <115060907+rishav2404@users.noreply.github.com>
@@ -79,9 +81,11 @@ Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
Robert Gislason
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
Rutam <138517416+performant23@users.noreply.github.com>
+Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
Ryan Seal
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com>
+Saurabh Singh
Seyyed Parsa Neshaei
Shashank Shekhar Singh
Shivam <11shivam00@gmail.com>
diff --git a/README.md b/README.md
index fc382ae3..313e687a 100644
--- a/README.md
+++ b/README.md
@@ -226,8 +226,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
[npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray.svg
[npm-url]: https://npmjs.org/package/@stdlib/ndarray
-[test-image]: https://github.com/stdlib-js/ndarray/actions/workflows/test.yml/badge.svg?branch=v0.3.3
-[test-url]: https://github.com/stdlib-js/ndarray/actions/workflows/test.yml?query=branch:v0.3.3
+[test-image]: https://github.com/stdlib-js/ndarray/actions/workflows/test.yml/badge.svg?branch=main
+[test-url]: https://github.com/stdlib-js/ndarray/actions/workflows/test.yml?query=branch:main
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray/main.svg
[coverage-url]: https://codecov.io/github/stdlib-js/ndarray?branch=main
diff --git a/base/assert/docs/types/index.d.ts b/base/assert/docs/types/index.d.ts
index ce94bb08..d5cf62eb 100644
--- a/base/assert/docs/types/index.d.ts
+++ b/base/assert/docs/types/index.d.ts
@@ -20,7 +20,9 @@
/* eslint-disable max-lines */
+import hasEqualShape = require( './../../../../base/assert/has-equal-shape' );
import isAllowedDataTypeCast = require( './../../../../base/assert/is-allowed-data-type-cast' );
+import isBooleanDataType = require( './../../../../base/assert/is-boolean-data-type' );
import isBufferLengthCompatible = require( './../../../../base/assert/is-buffer-length-compatible' );
import isBufferLengthCompatibleShape = require( './../../../../base/assert/is-buffer-length-compatible-shape' );
import isCastingMode = require( './../../../../base/assert/is-casting-mode' );
@@ -50,6 +52,24 @@ import isUnsignedIntegerDataType = require( './../../../../base/assert/is-unsign
* Interface describing the `assert` namespace.
*/
interface Namespace {
+ /**
+ * Tests whether two ndarrays have the same shape.
+ *
+ * @param x - first input ndarray
+ * @param y - second input ndarray
+ * @returns boolean indicating whether two ndarrays have the same shape
+ *
+ * @example
+ * var array = require( './../../../../array' );
+ *
+ * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );
+ * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] );
+ *
+ * var bool = ns.hasEqualShape( x, y );
+ * // returns true
+ */
+ hasEqualShape: typeof hasEqualShape;
+
/**
* Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode.
*
@@ -67,6 +87,54 @@ interface Namespace {
*/
isAllowedDataTypeCast: typeof isAllowedDataTypeCast;
+ /**
+ * Tests whether an input value is a supported ndarray boolean data type.
+ *
+ * @param v - value to test
+ * @returns boolean indicating whether an input value is a supported ndarray boolean data type
+ *
+ * @example
+ * var bool = ns.isBooleanDataType( 'binary' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'bool' );
+ * // returns true
+ *
+ * bool = ns.isBooleanDataType( 'float32' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'float64' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'generic' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'int16' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'int32' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'int8' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'uint16' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'uint32' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'uint8' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'uint8c' );
+ * // returns false
+ *
+ * bool = ns.isBooleanDataType( 'foo' );
+ * // returns false
+ */
+ isBooleanDataType: typeof isBooleanDataType;
+
/**
* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.
*
diff --git a/base/docs/types/index.d.ts b/base/docs/types/index.d.ts
index aba878dc..9a82e659 100644
--- a/base/docs/types/index.d.ts
+++ b/base/docs/types/index.d.ts
@@ -65,6 +65,7 @@ import maybeBroadcastArrays = require( './../../../base/maybe-broadcast-arrays'
import metaDataProps = require( './../../../base/meta-data-props' );
import minViewBufferIndex = require( './../../../base/min-view-buffer-index' );
import minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );
+import ndarraylike2ndarray = require( './../../../base/ndarraylike2ndarray' );
import ndarraylike2object = require( './../../../base/ndarraylike2object' );
import ndims = require( './../../../base/ndims' );
import nextCartesianIndex = require( './../../../base/next-cartesian-index' );
@@ -1568,7 +1569,23 @@ interface Namespace {
minmaxViewBufferIndex: typeof minmaxViewBufferIndex;
/**
- * Converts an ndarray-like to an object likely to have the same "shape".
+ * Converts an ndarray-like object to an ndarray.
+ *
+ * @param x - input ndarray
+ * @returns ndarray
+ *
+ * @example
+ * var array = require( './../../../array' );
+ *
+ * var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );
+ *
+ * var out = ns.ndarraylike2ndarray( x );
+ * // returns
+ */
+ ndarraylike2ndarray: typeof ndarraylike2ndarray;
+
+ /**
+ * Converts an ndarray-like object to an object likely to have the same "shape".
*
* ## Notes
*
@@ -2004,19 +2021,19 @@ interface Namespace {
* var ndarray = require( './../../../ctor' );
* var ndarray2array = require( './../../../to-array' );
*
- * var buffer = [ 1, 2, 3, 4, 5, 6 ];
+ * var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float64' );
* var shape = [ 3, 2 ];
* var strides = [ 2, 1 ];
* var offset = 0;
*
- * var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
* // returns
*
* var sh = x.shape;
* // returns [ 3, 2 ]
*
* var arr = ndarray2array( x );
- * // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+ * // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
*
* var y = ns.reverse( x, false );
* // returns
@@ -2025,7 +2042,7 @@ interface Namespace {
* // returns [ 3, 2 ]
*
* arr = ndarray2array( y );
- * // returns [ [ 6, 5 ], [ 4, 3 ], [ 2, 1 ] ]
+ * // returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
*/
reverse: typeof reverse;
@@ -2346,6 +2363,7 @@ interface Namespace {
* Returns a shifted view of an input ndarray along a specified dimension.
*
* @param x - input array
+ * @param dim - index of dimension to slice
* @param start - starting index (inclusive)
* @param strict - boolean indicating whether to enforce strict bounds checking
* @param writable - boolean indicating whether a returned array should be writable
@@ -2384,6 +2402,7 @@ interface Namespace {
* Returns a truncated view of an input ndarray along a specified dimension.
*
* @param x - input array
+ * @param dim - index of dimension to slice
* @param stop - ending index (exclusive)
* @param strict - boolean indicating whether to enforce strict bounds checking
* @param writable - boolean indicating whether a returned array should be writable
@@ -2829,6 +2848,7 @@ interface Namespace {
* - **sh**: dimensions sorted in loop order.
* - **sx**: input ndarray strides sorted in loop order.
* - **sy**: output ndarray strides sorted in loop order.
+ * - **idx**: dimension indices sorted in loop order.
*
* - When iterating over the elements of a multi-dimensional array, accessing elements which are closer in memory can improve performance. To this end, loop interchange is a technique used in loop nest optimization to improve locality of reference and take advantage of CPU cache.
*
@@ -2860,6 +2880,9 @@ interface Namespace {
*
* var ssy = o.sy;
* // returns [ 6, -2, 1 ]
+ *
+ * var idx = o.idx;
+ * // returns [ 2, 1, 0 ]
*/
unaryLoopOrder: typeof unaryLoopOrder;
diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts
index 91781417..4afd0f36 100644
--- a/docs/types/index.d.ts
+++ b/docs/types/index.d.ts
@@ -45,6 +45,7 @@ import maybeBroadcastArray = require( './../../maybe-broadcast-array' );
import maybeBroadcastArrays = require( './../../maybe-broadcast-arrays' );
import minDataType = require( './../../min-dtype' );
import mostlySafeCasts = require( './../../mostly-safe-casts' );
+import ndarraylike2ndarray = require( './../../ndarraylike2ndarray' );
import ndims = require( './../../ndims' );
import nextDataType = require( './../../next-dtype' );
import numel = require( './../../numel' );
@@ -840,6 +841,30 @@ interface Namespace {
*/
mostlySafeCasts: typeof mostlySafeCasts;
+ /**
+ * Converts an ndarray-like object to an ndarray.
+ *
+ * ## Notes
+ *
+ * - If provided a read-only ndarray, the function returns a read-only ndarray.
+ *
+ * @param x - input ndarray
+ * @param options - function options
+ * @param options.mode - specifies how to handle indices which exceed array dimensions (default: 'throw')
+ * @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis (default: ['throw'])
+ * @param options.readonly - specifies whether an array should be read-only
+ * @returns ndarray
+ *
+ * @example
+ * var array = require( './../../array' );
+ *
+ * var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );
+ *
+ * var out = ns.ndarraylike2ndarray( x );
+ * // returns
+ */
+ ndarraylike2ndarray: typeof ndarraylike2ndarray;
+
/**
* Returns the number of ndarray dimensions.
*
@@ -1192,6 +1217,7 @@ interface Namespace {
* Returns a read-only shifted view of an input ndarray along a specified dimension.
*
* @param x - input array
+ * @param dim - index of dimension to slice
* @param start - starting index (inclusive)
* @param options - function options
* @param options.strict - boolean indicating whether to enforce strict bounds checking
@@ -1230,6 +1256,7 @@ interface Namespace {
* Returns a read-only truncated view of an input ndarray along a specified dimension.
*
* @param x - input array
+ * @param dim - index of dimension to slice
* @param stop - ending index (exclusive)
* @param options - function options
* @param options.strict - boolean indicating whether to enforce strict bounds checking
diff --git a/iter/docs/types/index.d.ts b/iter/docs/types/index.d.ts
index a7bca324..74d79fb4 100644
--- a/iter/docs/types/index.d.ts
+++ b/iter/docs/types/index.d.ts
@@ -24,10 +24,14 @@ import nditerColumnEntries = require( './../../../iter/column-entries' );
import nditerColumns = require( './../../../iter/columns' );
import nditerEntries = require( './../../../iter/entries' );
import nditerIndices = require( './../../../iter/indices' );
+import nditerInterleaveSubarrays = require( './../../../iter/interleave-subarrays' );
import nditerMatrices = require( './../../../iter/matrices' );
import nditerMatrixEntries = require( './../../../iter/matrix-entries' );
import nditerRowEntries = require( './../../../iter/row-entries' );
import nditerRows = require( './../../../iter/rows' );
+import nditerSelectDimension = require( './../../../iter/select-dimension' );
+import nditerStacks = require( './../../../iter/stacks' );
+import nditerSubarrays = require( './../../../iter/subarrays' );
import nditer2arrayEach = require( './../../../iter/to-array-each' );
import nditerValues = require( './../../../iter/values' );
@@ -187,6 +191,45 @@ interface Namespace {
*/
nditerIndices: typeof nditerIndices;
+ /**
+ * Returns an iterator which iterates over interleaved subarrays.
+ *
+ * ## Notes
+ *
+ * - The function throws an error if a provided broadcast-incompatible ndarrays.
+ * - For input ndarrays supporting read-only views, the function returns *read-only* views of interleaved subarrays. As input ndarrays may be broadcasted, a view is typically *not* contiguous. As more than one element of a returned view may refer to the same memory location, writing to a view may affect multiple elements. If you need to write to a subarray, copy the subarray before attempting mutation.
+ *
+ * @param arr - input ndarrays
+ * @param ndims - number of dimensions to stack
+ * @returns iterator
+ *
+ * @example
+ * var array = require( './../../../array' );
+ * var ndarray2array = require( './../../../to-array' );
+ *
+ * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], {
+ * 'dtype': 'float64'
+ * });
+ * // returns
+ *
+ * var iter = ns.nditerInterleaveSubarrays( [ x, x ], 2 );
+ *
+ * var v = iter.next().value;
+ * // returns
+ *
+ * var arr = ndarray2array( v );
+ * // returns [ [ 1, 2 ], [ 3, 4 ] ]
+ *
+ * v = iter.next().value;
+ * // returns
+ *
+ * arr = ndarray2array( v );
+ * // returns [ [ 1, 2 ], [ 3, 4 ] ]
+ *
+ * // ...
+ */
+ nditerInterleaveSubarrays: typeof nditerInterleaveSubarrays;
+
/**
* Returns an iterator which iterates over each matrix in a stack of matrices.
*
@@ -353,6 +396,115 @@ interface Namespace {
*/
nditerRows: typeof nditerRows;
+ /**
+ * Returns an iterator which iterates over each view along a specified dimension.
+ *
+ * @param x - input value
+ * @param dim - dimension index
+ * @param options - function options
+ * @param options.readonly - boolean indicating whether returned views should be read-only
+ * @param options.keepdim - boolean indicating whether returned views should include the selected dimension as a singleton dimension
+ * @returns iterator
+ *
+ * @example
+ * var array = require( './../../../array' );
+ * var ndarray2array = require( './../../../to-array' );
+ *
+ * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], {
+ * 'dtype': 'float64'
+ * });
+ * // returns
+ *
+ * var iter = ns.nditerSelectDimension( x, 0 );
+ *
+ * var v = iter.next().value;
+ * // returns
+ *
+ * var arr = ndarray2array( v );
+ * // returns [ [ 1, 2 ], [ 3, 4 ] ]
+ *
+ * v = iter.next().value;
+ * // returns
+ *
+ * arr = ndarray2array( v );
+ * // returns [ [ 5, 6 ], [ 7, 8 ] ]
+ *
+ * // ...
+ */
+ nditerSelectDimension: typeof nditerSelectDimension;
+
+ /**
+ * Returns an iterator which iterates over each subarray in a stack of subarrays according to a list of specified stack dimensions.
+ *
+ * @param x - input value
+ * @param dims - indices of dimensions to stack
+ * @param options - function options
+ * @param options.readonly - boolean indicating whether returned views should be read-only
+ * @returns iterator
+ *
+ * @example
+ * var array = require( './../../../array' );
+ * var ndarray2array = require( './../../../to-array' );
+ *
+ * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], {
+ * 'dtype': 'float64'
+ * });
+ * // returns
+ *
+ * var iter = ns.nditerStacks( x, [ 1, 2 ] );
+ *
+ * var v = iter.next().value;
+ * // returns
+ *
+ * var arr = ndarray2array( v );
+ * // returns [ [ 1, 2 ], [ 3, 4 ] ]
+ *
+ * v = iter.next().value;
+ * // returns
+ *
+ * arr = ndarray2array( v );
+ * // returns [ [ 5, 6 ], [ 7, 8 ] ]
+ *
+ * // ...
+ */
+ nditerStacks: typeof nditerStacks;
+
+ /**
+ * Returns an iterator which iterates over each subarray in a stack of subarrays.
+ *
+ * @param x - input value
+ * @param ndims - number of dimensions to stack
+ * @param options - function options
+ * @param options.readonly - boolean indicating whether returned views should be read-only
+ * @returns iterator
+ *
+ * @example
+ * var array = require( './../../../array' );
+ * var ndarray2array = require( './../../../to-array' );
+ *
+ * var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ], {
+ * 'dtype': 'float64'
+ * });
+ * // returns
+ *
+ * var iter = ns.nditerSubarrays( x, 2 );
+ *
+ * var v = iter.next().value;
+ * // returns
+ *
+ * var arr = ndarray2array( v );
+ * // returns [ [ 1, 2 ], [ 3, 4 ] ]
+ *
+ * v = iter.next().value;
+ * // returns
+ *
+ * arr = ndarray2array( v );
+ * // returns [ [ 5, 6 ], [ 7, 8 ] ]
+ *
+ * // ...
+ */
+ nditerSubarrays: typeof nditerSubarrays;
+
/**
* Returns an iterator which converts each iterated ndarray to a generic array.
*