diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 3d3cfc5b..cd15304a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -44,6 +44,11 @@ jobs:
run: |
npm install || npm install || npm install
timeout-minutes: 15
+ - name: Build native add-on (if present)
+ run: |
+ if [ -f "binding.gyp" ]; then
+ npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
+ fi
- name: Run tests
id: tests
run: |
diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml
index ae56523c..f5697d4b 100644
--- a/.github/workflows/test_coverage.yml
+++ b/.github/workflows/test_coverage.yml
@@ -40,6 +40,11 @@ jobs:
run: |
npm install || npm install || npm install
timeout-minutes: 15
+ - name: Build native add-on (if present)
+ run: |
+ if [ -f "binding.gyp" ]; then
+ npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
+ fi
- name: Calculate test coverage
run: |
npm run test-cov || npm run test-cov || npm run test-cov
diff --git a/README.md b/README.md
index 0bad4aeb..2ab5a7ab 100644
--- a/README.md
+++ b/README.md
@@ -121,6 +121,16 @@ console.log( objectKeys( ns ) );
+
+
+
+
+
+
+
+
diff --git a/array/README.md b/array/README.md
index ed752a8c..9db86ced 100644
--- a/array/README.md
+++ b/array/README.md
@@ -243,6 +243,14 @@ str = JSON.stringify( arr.toJSON() );
+
+
+
+
+
+
diff --git a/base/README.md b/base/README.md
index 6139cd9c..64bbd89b 100644
--- a/base/README.md
+++ b/base/README.md
@@ -112,6 +112,16 @@ console.log( objectKeys( ns ) );
+
+
+
+
+
+
+
+
diff --git a/base/assert/README.md b/base/assert/README.md
index 6346db43..4b65d9cb 100644
--- a/base/assert/README.md
+++ b/base/assert/README.md
@@ -86,6 +86,16 @@ console.log( objectKeys( ns ) );
+
+
+
+
+
+
+
+
diff --git a/base/assert/is-allowed-data-type-cast/README.md b/base/assert/is-allowed-data-type-cast/README.md
index 51f9ace4..406b34c5 100644
--- a/base/assert/is-allowed-data-type-cast/README.md
+++ b/base/assert/is-allowed-data-type-cast/README.md
@@ -123,6 +123,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-buffer-length-compatible-shape/README.md b/base/assert/is-buffer-length-compatible-shape/README.md
index 3cabbd06..e9527e26 100644
--- a/base/assert/is-buffer-length-compatible-shape/README.md
+++ b/base/assert/is-buffer-length-compatible-shape/README.md
@@ -116,6 +116,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-buffer-length-compatible/README.md b/base/assert/is-buffer-length-compatible/README.md
index 72c65522..f5f17027 100644
--- a/base/assert/is-buffer-length-compatible/README.md
+++ b/base/assert/is-buffer-length-compatible/README.md
@@ -130,6 +130,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-casting-mode/README.md b/base/assert/is-casting-mode/README.md
index 68dcaf45..224697cf 100644
--- a/base/assert/is-casting-mode/README.md
+++ b/base/assert/is-casting-mode/README.md
@@ -106,6 +106,14 @@ bool = isCastingMode( 'foo' );
+
+
+
+
+
+
diff --git a/base/assert/is-column-major-contiguous/README.md b/base/assert/is-column-major-contiguous/README.md
index f8ca0329..1596bae6 100644
--- a/base/assert/is-column-major-contiguous/README.md
+++ b/base/assert/is-column-major-contiguous/README.md
@@ -136,6 +136,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-column-major/README.md b/base/assert/is-column-major/README.md
index 025ed8ff..4dd76855 100644
--- a/base/assert/is-column-major/README.md
+++ b/base/assert/is-column-major/README.md
@@ -103,6 +103,14 @@ bool = isColumnMajor( strides );
+
+
+
+
+
+
diff --git a/base/assert/is-contiguous/README.md b/base/assert/is-contiguous/README.md
index e4cf8cea..13f52b29 100644
--- a/base/assert/is-contiguous/README.md
+++ b/base/assert/is-contiguous/README.md
@@ -136,6 +136,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-data-type/README.md b/base/assert/is-data-type/README.md
index 8afa7ba4..198bac3e 100644
--- a/base/assert/is-data-type/README.md
+++ b/base/assert/is-data-type/README.md
@@ -127,6 +127,14 @@ bool = isDataType( 'foo' );
+
+
+
+
+
+
diff --git a/base/assert/is-index-mode/README.md b/base/assert/is-index-mode/README.md
index 236b5a68..25800c93 100644
--- a/base/assert/is-index-mode/README.md
+++ b/base/assert/is-index-mode/README.md
@@ -106,6 +106,14 @@ bool = isIndexMode( 'foo' );
+
+
+
+
+
+
diff --git a/base/assert/is-order/README.md b/base/assert/is-order/README.md
index b72747da..66c8969d 100644
--- a/base/assert/is-order/README.md
+++ b/base/assert/is-order/README.md
@@ -100,6 +100,14 @@ bool = isOrder( 'foo' );
+
+
+
+
+
+
diff --git a/base/assert/is-row-major-contiguous/README.md b/base/assert/is-row-major-contiguous/README.md
index 82dd3085..ee67e44b 100644
--- a/base/assert/is-row-major-contiguous/README.md
+++ b/base/assert/is-row-major-contiguous/README.md
@@ -136,6 +136,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-row-major/README.md b/base/assert/is-row-major/README.md
index 983436f7..096a3dbc 100644
--- a/base/assert/is-row-major/README.md
+++ b/base/assert/is-row-major/README.md
@@ -103,6 +103,14 @@ bool = isRowMajor( strides );
+
+
+
+
+
+
diff --git a/base/assert/is-safe-data-type-cast/README.md b/base/assert/is-safe-data-type-cast/README.md
index 08c94dc7..68329237 100644
--- a/base/assert/is-safe-data-type-cast/README.md
+++ b/base/assert/is-safe-data-type-cast/README.md
@@ -107,6 +107,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-same-kind-data-type-cast/README.md b/base/assert/is-same-kind-data-type-cast/README.md
index 7fac08ca..abf66e84 100644
--- a/base/assert/is-same-kind-data-type-cast/README.md
+++ b/base/assert/is-same-kind-data-type-cast/README.md
@@ -107,6 +107,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/assert/is-single-segment-compatible/README.md b/base/assert/is-single-segment-compatible/README.md
index e28b3cb9..cc2284fd 100644
--- a/base/assert/is-single-segment-compatible/README.md
+++ b/base/assert/is-single-segment-compatible/README.md
@@ -136,6 +136,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/bind2vind/README.md b/base/bind2vind/README.md
index 161f5858..0f874fdc 100644
--- a/base/bind2vind/README.md
+++ b/base/bind2vind/README.md
@@ -156,6 +156,14 @@ for ( i = 0; i < len; i++ ) {
+
+
+
+
+
+
diff --git a/base/broadcast-array/README.md b/base/broadcast-array/README.md
index eec5758f..bb8eed8a 100644
--- a/base/broadcast-array/README.md
+++ b/base/broadcast-array/README.md
@@ -127,6 +127,14 @@ for ( i = 0; i < N; i++ ) {
+
+
+
+
+
+
diff --git a/base/broadcast-shapes/README.md b/base/broadcast-shapes/README.md
index 0a2bc113..4dac2726 100644
--- a/base/broadcast-shapes/README.md
+++ b/base/broadcast-shapes/README.md
@@ -389,6 +389,14 @@ int main() {
+
+
+
+
+
+
diff --git a/base/buffer-ctors/README.md b/base/buffer-ctors/README.md
index 954a3d9e..4fe715d6 100644
--- a/base/buffer-ctors/README.md
+++ b/base/buffer-ctors/README.md
@@ -118,6 +118,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/buffer-dtype-enum/README.md b/base/buffer-dtype-enum/README.md
index bc7e2cb0..e40e9685 100644
--- a/base/buffer-dtype-enum/README.md
+++ b/base/buffer-dtype-enum/README.md
@@ -134,6 +134,14 @@ console.log( '%s => %s', 'generic', c );
+
+
+
+
+
+
diff --git a/base/buffer-dtype/README.md b/base/buffer-dtype/README.md
index 564ebf32..a6e7925f 100644
--- a/base/buffer-dtype/README.md
+++ b/base/buffer-dtype/README.md
@@ -130,6 +130,14 @@ console.log( '%s == %s => %s', 'generic', dt, dt === 'generic' );
+
+
+
+
+
+
diff --git a/base/buffer/README.md b/base/buffer/README.md
index 2365ef46..08e63547 100644
--- a/base/buffer/README.md
+++ b/base/buffer/README.md
@@ -118,6 +118,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/bytes-per-element/README.md b/base/bytes-per-element/README.md
index 62e5a8d1..7dcd125e 100644
--- a/base/bytes-per-element/README.md
+++ b/base/bytes-per-element/README.md
@@ -120,6 +120,14 @@ for ( i = 0; i < dtypes.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/clamp-index/README.md b/base/clamp-index/README.md
index 84b731c2..09a61f80 100644
--- a/base/clamp-index/README.md
+++ b/base/clamp-index/README.md
@@ -102,6 +102,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/ctor/README.md b/base/ctor/README.md
index f268c1b1..01f26969 100644
--- a/base/ctor/README.md
+++ b/base/ctor/README.md
@@ -639,6 +639,14 @@ str = JSON.stringify( arr.toJSON() );
+
+
+
+
+
+
diff --git a/base/dtype-char/README.md b/base/dtype-char/README.md
index e8fadf24..49296f9a 100644
--- a/base/dtype-char/README.md
+++ b/base/dtype-char/README.md
@@ -119,6 +119,14 @@ for ( i = 0; i < dtypes.length; i++ ) {
+
+
+
+
+
+
diff --git a/base/dtypes2signatures/README.md b/base/dtypes2signatures/README.md
index d4d255a4..9938b5f6 100644
--- a/base/dtypes2signatures/README.md
+++ b/base/dtypes2signatures/README.md
@@ -164,6 +164,14 @@ console.log( sigs );
+
+
+
+
+
+
diff --git a/base/function-object/README.md b/base/function-object/README.md
index 409eb83e..65213733 100644
--- a/base/function-object/README.md
+++ b/base/function-object/README.md
@@ -395,6 +395,14 @@ If a function is found, the function returns the index of the function, and the
+
+
+
+
+
+
diff --git a/base/ind/README.md b/base/ind/README.md
index cb92a25c..a84062de 100644
--- a/base/ind/README.md
+++ b/base/ind/README.md
@@ -135,6 +135,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/ind2sub/README.md b/base/ind2sub/README.md
index 0691b0ba..df13e221 100644
--- a/base/ind2sub/README.md
+++ b/base/ind2sub/README.md
@@ -404,6 +404,14 @@ int main() {
+
+
+
+
+
+
diff --git a/base/iteration-order/README.md b/base/iteration-order/README.md
index 448ee530..7e2d9e67 100644
--- a/base/iteration-order/README.md
+++ b/base/iteration-order/README.md
@@ -120,6 +120,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/max-view-buffer-index/README.md b/base/max-view-buffer-index/README.md
index 6aaccea5..d252e0a0 100644
--- a/base/max-view-buffer-index/README.md
+++ b/base/max-view-buffer-index/README.md
@@ -130,6 +130,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/min-view-buffer-index/README.md b/base/min-view-buffer-index/README.md
index 0925c8fa..a8ff0591 100644
--- a/base/min-view-buffer-index/README.md
+++ b/base/min-view-buffer-index/README.md
@@ -130,6 +130,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/minmax-view-buffer-index/README.md b/base/minmax-view-buffer-index/README.md
index 7718628a..dd2ee7c7 100644
--- a/base/minmax-view-buffer-index/README.md
+++ b/base/minmax-view-buffer-index/README.md
@@ -250,6 +250,14 @@ int main() {
+
+
+
+
+
+
diff --git a/base/napi/README.md b/base/napi/README.md
index 65108438..386ea104 100644
--- a/base/napi/README.md
+++ b/base/napi/README.md
@@ -156,6 +156,14 @@ For API documentation, consult the individual packages.
+
+
+
+
+
+
diff --git a/base/napi/addon-arguments/README.md b/base/napi/addon-arguments/README.md
index a05df0a1..395fee84 100644
--- a/base/napi/addon-arguments/README.md
+++ b/base/napi/addon-arguments/README.md
@@ -220,6 +220,14 @@ The function returns a `napi_status` status code indicating success or failure (
+
+
+
+
+
+
diff --git a/base/napi/dtype-string-to-dtype/README.md b/base/napi/dtype-string-to-dtype/README.md
index 6effbb01..35afd516 100644
--- a/base/napi/dtype-string-to-dtype/README.md
+++ b/base/napi/dtype-string-to-dtype/README.md
@@ -107,6 +107,14 @@ napi_value addon( napi_env env, napi_callback_info info ) {
+
+
+
+
+
+
diff --git a/base/napi/typedarray-type-to-dtype/README.md b/base/napi/typedarray-type-to-dtype/README.md
index eb42162e..99778efe 100644
--- a/base/napi/typedarray-type-to-dtype/README.md
+++ b/base/napi/typedarray-type-to-dtype/README.md
@@ -107,6 +107,14 @@ napi_value addon( napi_env env, napi_callback_info info ) {
+
+
+
+
+
+
diff --git a/base/napi/unary/README.md b/base/napi/unary/README.md
index cb748e23..09798eb9 100644
--- a/base/napi/unary/README.md
+++ b/base/napi/unary/README.md
@@ -208,6 +208,14 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
+
+
+
+
+
+
diff --git a/base/nonsingleton-dimensions/README.md b/base/nonsingleton-dimensions/README.md
index 099e1026..1e731c0f 100644
--- a/base/nonsingleton-dimensions/README.md
+++ b/base/nonsingleton-dimensions/README.md
@@ -189,6 +189,14 @@ int main() {
+
+
+
+
+
+
diff --git a/base/numel/README.md b/base/numel/README.md
index 4346c67f..478d99b5 100644
--- a/base/numel/README.md
+++ b/base/numel/README.md
@@ -101,6 +101,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/serialize-meta-data/README.md b/base/serialize-meta-data/README.md
index 18bbd432..34e6491e 100644
--- a/base/serialize-meta-data/README.md
+++ b/base/serialize-meta-data/README.md
@@ -184,6 +184,14 @@ console.log( 'order (enum): %d', order );
+
+
+
+
+
+
diff --git a/base/shape2strides/README.md b/base/shape2strides/README.md
index a1a2d5c3..651c1418 100644
--- a/base/shape2strides/README.md
+++ b/base/shape2strides/README.md
@@ -223,6 +223,14 @@ int main() {
+
+
+
+
+
+
diff --git a/base/singleton-dimensions/README.md b/base/singleton-dimensions/README.md
index 7e22159d..65070c72 100644
--- a/base/singleton-dimensions/README.md
+++ b/base/singleton-dimensions/README.md
@@ -189,6 +189,14 @@ int main() {
+
+
+
+
+
+
diff --git a/base/strides2offset/README.md b/base/strides2offset/README.md
index 154ce89d..df91e18e 100644
--- a/base/strides2offset/README.md
+++ b/base/strides2offset/README.md
@@ -119,6 +119,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/base/strides2order/README.md b/base/strides2order/README.md
index 9c1b8187..c3c57fb4 100644
--- a/base/strides2order/README.md
+++ b/base/strides2order/README.md
@@ -135,6 +135,14 @@ for ( i = 0; i < 20; i++ ) {
+
+
+
+
+
+
diff --git a/base/sub2ind/README.md b/base/sub2ind/README.md
index 45b53ed5..5a6b0cad 100644
--- a/base/sub2ind/README.md
+++ b/base/sub2ind/README.md
@@ -237,6 +237,14 @@ for ( i = 0; i < 20; i++ ) {
+
+
+
+
+
+
diff --git a/base/to-array/README.md b/base/to-array/README.md
index ce673a81..6369744c 100644
--- a/base/to-array/README.md
+++ b/base/to-array/README.md
@@ -156,6 +156,14 @@ for ( i = 0; i < 20; i++ ) {
+
+
+
+
+
+
diff --git a/base/unary/README.md b/base/unary/README.md
index 5b2d39ef..8317af3a 100644
--- a/base/unary/README.md
+++ b/base/unary/README.md
@@ -20,18 +20,16 @@ limitations under the License.
# Unary
-> Apply a unary callback to elements in a input ndarray and assign results to elements in an output ndarray.
-
-
+> Apply a unary callback to elements in an input ndarray and assign results to elements in an output ndarray.
+TODO: add note to documentation that can be more performant for non-contiguous very high-dimensional arrays to be copied to contiguous memory before applying a unary function.
+
-
-
## Usage
@@ -40,75 +38,107 @@ limitations under the License.
var unary = require( '@stdlib/ndarray/base/unary' );
```
-#### unary( arrays, fcn )
+#### unary( arrays, shape, strides, fcn )
-Applies a unary callback to elements in a input ndarray and assign results to elements in an output ndarray.
+Applies a unary callback to elements in an input ndarray and assigns results to elements in an output ndarray.
```javascript
var Float64Array = require( '@stdlib/array/float64' );
-var unary = require( '@stdlib/ndarray/base/unary' );
+var abs = require( '@stdlib/math/base/special/abs' );
-function scale( x ) {
- return x * 10.0;
-}
+var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
+
+// Compute the absolute values in-place:
+unary( [ x, x ], [ x.length ], [ 1, 1 ], abs );
+// x => [ 2.0, 1.0, 3.0, 5.0, 4.0, 0.0, 1.0, 3.0 ]
+```
+
+The function accepts the following arguments:
+
+- **arrays**: array-like object containing one input ndarray and one output ndarray.
+- **shape**: array-like object containing a single element, the number of indexed elements.
+- **strides**: array-like object containing the stride lengths for the strided input and output arrays.
+- **fcn**: unary function to apply.
+
+The `shape` and `strides` parameters determine which elements in the strided input and output arrays are accessed at runtime. For example, to index every other value in the input ndarray and to index the first `N` elements of the output ndarray in reverse order,
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var abs = require( '@stdlib/math/base/special/abs' );
+
+var x = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
-// Create data buffers:
-var arr = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ];
-var xbuf = new Float64Array( arr);
-var ybuf = new Float64Array( 6 );
+var N = 3;
-// Define the shape of the input and output arrays:
-var shape = [ 3, 1, 2 ];
+unary( [ x, y ], [ N ], [ 2, -1 ], abs );
+// y => [ 5.0, 3.0, 1.0, 0.0, 0.0, 0.0 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var abs = require( '@stdlib/math/base/special/abs' );
+
+// Initial arrays...
+var x0 = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+var y0 = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+// Create offset views...
+var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // start at 4th element
+
+var N = 3;
-// Define the array strides:
-var sx = [ 4, 4, 1 ];
-var sy = [ 2, 2, 1 ];
+unary( [ x1, y1 ], [ N ], [ -2, 1 ], abs );
+// y0 => [ 0.0, 0.0, 0.0, 6.0, 4.0, 2.0 ]
+```
+
+#### unary.ndarray( arrays, shape, strides, offsets, fcn )
-// Define the index offsets:
-var ox = 1;
-var oy = 0;
+Applies a unary callback to elements in an input ndarray and assigns results to elements in an output ndarray using alternative indexing semantics.
-// Create the input and output ndarray-like objects:
-var x = {
- 'dtype': 'float64',
- 'data': xbuf,
- 'shape': shape,
- 'strides': sx,
- 'offset': ox,
- 'order': 'row-major'
-};
-var y = {
- 'dtype': 'float64',
- 'data': ybuf,
- 'shape': shape,
- 'strides': sy,
- 'offset': oy,
- 'order': 'row-major'
-};
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var abs = require( '@stdlib/math/base/special/abs' );
-// Apply the unary function:
-unary( [ x, y ], scale );
+var x = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0 ] );
+var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );
-console.log( y.data );
-// => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]
+unary.ndarray( [ x, y ], [ x.length ], [ 1, 1 ], [ 0, 0 ], abs );
+// y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]
```
-
+The function accepts the following additional arguments:
+
+- **offsets**: array-like object containing the starting indices (i.e., index offsets) for the strided input and output arrays.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offsets` parameter supports indexing semantics based on starting indices. For example, to index every other value in the input ndarray starting from the second value and to index the last `N` elements in the output ndarray,
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+var abs = require( '@stdlib/math/base/special/abs' );
+
+var x = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+var N = 3;
+
+unary.ndarray( [ x, y ], [ N ], [ 2, -1 ], [ 1, y.length-1 ], abs );
+// y => [ 0.0, 0.0, 0.0, 6.0, 4.0, 2.0 ]
+```
-
-
-
-
## Examples
@@ -119,56 +149,3216 @@ console.log( y.data );
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
var filledarray = require( '@stdlib/array/filled' );
var gfillBy = require( '@stdlib/blas/ext/base/gfill-by' );
-var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
-var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
var unary = require( '@stdlib/ndarray/base/unary' );
-function scale( x ) {
- return x * 10;
+function add10( x ) {
+ return x + 10;
}
var N = 10;
-var xbuf = filledarray( 0, N, 'generic' );
-gfillBy( xbuf.length, xbuf, 1, discreteUniform( -100, 100 ) );
-
-var x = {
- 'dtype': 'generic',
- 'data': xbuf,
- 'shape': [ 5, 2 ],
- 'strides': [ 2, 1 ],
- 'offset': 0,
- 'order': 'row-major'
-};
-var y = {
- 'dtype': 'generic',
- 'data': filledarray( 0, N, 'generic' ),
- 'shape': x.shape.slice(),
- 'strides': shape2strides( x.shape, 'column-major' ),
- 'offset': 0,
- 'order': 'column-major'
-};
-
-unary( [ x, y ], scale );
-console.log( ndarray2array( x.data, x.shape, x.strides, x.offset, x.order ) );
-console.log( ndarray2array( y.data, y.shape, y.strides, y.offset, y.order ) );
+var x = filledarray( 0.0, N, 'generic' );
+gfillBy( x.length, x, 1, discreteUniform( -100, 100 ) );
+console.log( x );
+
+var y = filledarray( 0.0, N, 'generic' );
+console.log( y );
+
+var shape = [ N ];
+var strides = [ 1, -1 ];
+var offsets = [ 0, N-1 ];
+
+unary.ndarray( [ x, y ], shape, strides, offsets, add10 );
+console.log( y );
```
-
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+Character codes for data types:
+
+- **d**: `float64` (double-precision floating-point number).
+- **f**: `float32` (single-precision floating-point number).
+- **s**: `int8` (signed 8-bit integer).
+- **b**: `uint8` (unsigned 8-bit integer).
+- **k**: `int16` (signed 16-bit integer).
+- **t**: `uint16` (unsigned 16-bit integer).
+- **i**: `int32` (signed 32-bit integer).
+- **u**: `uint32` (unsigned 32-bit integer).
+- **l**: `int64` (signed 64-bit integer).
+- **v**: `uint64` (unsigned 64-bit integer).
+
+Function name suffix naming convention:
+
+```text
+stdlib_ndarray__[_as__]
+```
+
+For example,
+
+```c
+void stdlib_ndarray_d_d(...) {...}
+```
+
+is a function which accepts one double-precision floating-point input ndarray and one double-precision floating-point output ndarray. In other words, the suffix encodes the function type signature.
+
+To support callbacks whose input arguments and/or return values are of a different data type than the strided input and/or output array data types, the naming convention supports appending an `as` suffix. For example,
+
+```c
+void stdlib_ndarray_f_f_as_d_d(...) {...}
+```
+
+is a function which accepts one single-precision floating-point input ndarray and one single-precision floating-point output ndarray. However, the callback accepts and returns double-precision floating-point numbers. Accordingly, the input and output values need to be cast using the following conversion sequence
+
+```c
+// Convert each input array element to double-precision:
+double dxi = (double)fx[ i ];
+
+// Evaluate the callback:
+double dyi = f( dxi );
-
+// Convert the callback return value to single-precision:
+fy[ i ] = (float)dyi;
+```
-
+
-
+
-
+
+
+### Usage
+
+```c
+#include "stdlib/ndarray/base/unary.h"
+```
+
+#### UnaryFcnFloat32
+
+Function type for a function accepting and returning single-precision floating-point numbers.
+
+```c
+typedef float UnaryFcnFloat32( const float x );
+```
+
+A `UnaryFcnFloat32` function should accept the following arguments:
+
+- **x**: `[in] float` single-precision floating-point number.
+
+The function should return a single-precision floating-point number.
+
+#### UnaryFcnFloat32Int64
+
+Function type for a function which accepts a single-precision floating-point number and returns a signed 64-bit integer.
+
+```c
+typedef int64_t UnaryFcnFloat32Int64( const float x );
+```
+
+A `UnaryFcnFloat32Int64` function should accept the following arguments:
+
+- **x**: `[in] float` single-precision floating-point number.
+
+The function should return a signed 64-bit integer.
+
+#### UnaryFcnFloat32Int32
+
+Function type for a function which accepts a single-precision floating-point number and returns a signed 32-bit integer.
+
+```c
+typedef int32_t UnaryFcnFloat32Int32( const float x );
+```
+
+A `UnaryFcnFloat32Int32` function should accept the following arguments:
+
+- **x**: `[in] float` single-precision floating-point number.
+
+The function should return a signed 32-bit integer.
+
+#### UnaryFcnFloat64
+
+Function type for a function which accepts and returns double-precision floating-point numbers.
+
+```c
+typedef double UnaryFcnFloat64( const double x );
+```
+
+A `UnaryFcnFloat64` function should accept the following arguments:
+
+- **x**: `[in] double` double-precision floating-point number.
+
+The function should return a double-precision floating-point number.
+
+#### UnaryFcnFloat64Int64
+
+Function type for a function which accepts a double-precision floating-point number and returns a signed 64-bit integer.
+
+```c
+typedef int64_t UnaryFcnFloat64Int64( const double x );
+```
+
+A `UnaryFcnFloat64Int64` function should accept the following arguments:
+
+- **x**: `[in] double` double-precision floating-point number.
+
+The function should return a signed 64-bit integer.
+
+#### UnaryFcnFloat64Int32
+
+Function type for a function which accepts a double-precision floating-point number and returns a signed 32-bit integer.
+
+```c
+typedef int32_t UnaryFcnFloat64Int32( const double x );
+```
+
+A `UnaryFcnFloat64Int32` function should accept the following arguments:
+
+- **x**: `[in] double` double-precision floating-point number.
+
+The function should return a signed 32-bit integer.
+
+#### UnaryFcnInt64
+
+Function type for a function which accepts and returns signed 64-bit integers.
+
+```c
+typedef int64_t UnaryFcnInt64( const int64_t x );
+```
+
+A `UnaryFcnInt64` function should accept the following arguments:
+
+- **x**: `[in] int64_t` signed 64-bit integer.
+
+The function should return a signed 64-bit integer.
+
+#### UnaryFcnUint64
+
+Function type for a function which accepts and returns unsigned 64-bit integers.
+
+```c
+typedef uint64_t UnaryFcnUint64( const uint64_t x );
+```
+
+A `UnaryFcnUint64` function should accept the following arguments:
+
+- **x**: `[in] uint64_t` unsigned 64-bit integer.
+
+The function should return an unsigned 64-bit integer.
+
+#### UnaryFcnInt32
+
+Function type for a function which accepts and returns signed 32-bit integers.
+
+```c
+typedef int32_t UnaryFcnInt32( const int32_t x );
+```
+
+A `UnaryFcnInt32` function should accept the following arguments:
+
+- **x**: `[in] int32_t` signed 32-bit integer.
+
+The function should return a signed 32-bit integer.
+
+#### UnaryFcnUint32
+
+Function type for a function which accepts and returns unsigned 32-bit integers.
+
+```c
+typedef uint32_t UnaryFcnUint32( const uint32_t x );
+```
+
+A `UnaryFcnUint32` function should accept the following arguments:
+
+- **x**: `[in] uint32_t` unsigned 32-bit integer.
+
+The function should return an unsigned 32-bit integer.
+
+#### UnaryFcnInt16
+
+Function type for a function which accepts and returns signed 16-bit integers.
+
+```c
+typedef int16_t UnaryFcnInt16( const int16_t x );
+```
+
+A `UnaryFcnInt16` function should accept the following arguments:
+
+- **x**: `[in] int16_t` signed 16-bit integer.
+
+The function should return a signed 16-bit integer.
+
+#### UnaryFcnUint16
+
+Function type for a function which accepts and returns unsigned 16-bit integers.
+
+```c
+typedef uint16_t UnaryFcnUint16( const uint16_t x );
+```
+
+A `UnaryFcnUint16` function should accept the following arguments:
+
+- **x**: `[in] uint16_t` unsigned 16-bit integer.
+
+The function should return an unsigned 16-bit integer.
+
+#### UnaryFcnInt8
+
+Function type for a function which accepts and returns signed 8-bit integers.
+
+```c
+typedef int8_t UnaryFcnInt8( const int8_t x );
+```
+
+A `UnaryFcnInt8` function should accept the following arguments:
+
+- **x**: `[in] int8_t` signed 8-bit integer.
+
+The function should return a signed 8-bit integer.
+
+#### UnaryFcnUint8
+
+Function type for a function which accepts and returns unsigned 8-bit integers.
+
+```c
+typedef uint8_t UnaryFcnUint8( const uint8_t x );
+```
+
+A `UnaryFcnUint8` function should accept the following arguments:
+
+- **x**: `[in] uint8_t` unsigned 8-bit integer.
+
+The function should return an unsigned 8-bit integer.
+
+
+
+* * *
+
+#### stdlib_ndarray_b_b( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 8-bit integers to an unsigned 8-bit integer input ndarray and assigns results to elements in an unsigned 8-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 1 }; // 1 byte per uint8
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_b( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 8-bit integers to an unsigned 8-bit integer input ndarray, casts the callback's unsigned 8-bit integer return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 8 }; // 1 byte per uint8, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to an unsigned 8-bit integer input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 8 }; // 1 byte per uint8, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 8-bit integers to an unsigned 8-bit integer input ndarray, casts the callback's unsigned 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_f_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to an unsigned 8-bit integer input ndarray, casts the callback's double-precision floating-point return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_f_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_f_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_f_as_f_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning single-precision floating-point numbers to an unsigned 8-bit integer input ndarray, casts the callback's single-precision floating-point return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+float scale( const float x ) {
+ return x + 10.0f;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_f_as_f_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_f_as_f_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to an unsigned 8-bit integer input ndarray, casts the callback's unsigned 8-bit integer return value to a signed 32-bit integer, and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_i_as_i_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to an unsigned 8-bit integer input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t scale( const int32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_i_as_i_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_i_as_i_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_k( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 8-bit integers to an unsigned 8-bit integer input ndarray, casts the callback's unsigned 8-bit integer return value to a signed 16-bit integer, and assigns results to elements in a signed 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per uint8, 2 bytes per int16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_k( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_k_as_k_k( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to an unsigned 8-bit integer input ndarray and assigns results to elements in a signed 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per uint8, 2 bytes per int16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t scale( const int16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_k_as_k_k( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_k_as_k_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_t( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 8-bit integers to an unsigned 8-bit integer input ndarray, casts the callback's unsigned 8-bit integer return value to an unsigned 16-bit integer, and assigns results to elements in an unsigned 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per uint8, 2 bytes per uint16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_t( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_t_as_t_t( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 16-bit integers to an unsigned 8-bit integer input ndarray and assigns results to elements in an unsigned 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per uint8, 2 bytes per uint16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint16_t scale( const uint16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_t_as_t_t( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_t_as_t_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 8-bit integers to an unsigned 8-bit integer input ndarray, casts the callback's unsigned 8-bit integer return value to an unsigned 32-bit integer, and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint8_t scale( const uint8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_u( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_b_u_as_u_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 32-bit integers to an unsigned 8-bit integer input ndarray and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per uint8, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint32_t scale( const uint32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_b_u_as_u_u( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_b_u_as_u_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a double-precision floating-point input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 8, 8 }; // 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_d_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting a double-precision floating-point number and returning a signed 32-bit integer to a double-precision floating-point input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 8, 4 }; // 8 bytes per double, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Apply the callback:
+stdlib_ndarray_d_i( arrays, shape, strides, (void *)lrint );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64Int32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_d_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_d_l( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting a double-precision floating-point number and returning a signed 64-bit integer to a double-precision floating-point input ndarray and assigns results to elements in a signed 64-bit integer output ndarray.
+
+```c
+#include
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 8, 8 }; // 8 bytes per double, 8 bytes per int64
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Apply the callback:
+stdlib_ndarray_d_l( arrays, shape, strides, (void *)llrint );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64Int64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_d_l( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_f_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning single-precision floating-point numbers to a single-precision floating-point input ndarray, casts the callback's single-precision floating-point return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per float, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+float scale( const float x ) {
+ return x + 10.0f;
+}
+
+// Apply the callback:
+stdlib_ndarray_f_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_f_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_f_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a single-precision floating-point input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per float, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_f_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_f_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_f_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning single-precision floating-point numbers to a single-precision floating-point input ndarray and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 4 }; // 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+float scale( const float x ) {
+ return x + 10.0f;
+}
+
+// Apply the callback:
+stdlib_ndarray_f_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_f_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_f_f_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers, casts the callback's double-precision floating-point return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 4 }; // 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_f_f_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_f_f_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_f_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting a single-precision floating-point number and returning a signed 32-bit integer to a single-precision floating-point input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 4 }; // 4 bytes per float, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Apply the callback:
+stdlib_ndarray_f_i( arrays, shape, strides, (void *)lrintf );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32Int32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_f_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_f_l( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting a single-precision floating-point number and returning a signed 64-bit integer to a single-precision floating-point input ndarray and assigns results to elements in a signed 64-bit integer output ndarray.
+
+```c
+#include
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per float, 8 bytes per int64
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Apply the callback:
+stdlib_ndarray_f_l( arrays, shape, strides, (void *)lrintf );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32Int64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_f_l( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_i_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to a signed 32-bit integer input ndarray, casts the callback's signed 32-bit integer return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per int32, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t scale( const int32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_i_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_i_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_i_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a signed 32-bit integer input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per int32, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_i_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_i_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_i_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to a signed 32-bit integer input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 4 }; // 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t scale( const int32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_i_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_i_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_i_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to a signed 32-bit integer input ndarray, casts the callback's signed 32-bit integer return value to an unsigned 32-bit integer, and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 4 }; // 4 bytes per int32, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t abs( const int32_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_i_u( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_i_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to a signed 16-bit integer input ndarray, casts the callback's signed 16-bit integer return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 8 }; // 2 bytes per int16, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t scale( const int16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a signed 16-bit integer input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 8 }; // 2 bytes per int16, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to a signed 16-bit integer input ndarray, casts the callback's signed 16-bit integer return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per int16, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t scale( const int16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_f_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a signed 16-bit integer input ndarray, casts the callback's double-precision floating-point return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per int16, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_f_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_f_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_f_as_f_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning single-precision floating-point numbers to a signed 16-bit integer input ndarray and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per int16, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+float scale( const float x ) {
+ return x + 10.0f;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_f_as_f_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_f_as_f_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to a signed 16-bit integer input ndarray, casts the callback's signed 16-bit integer return value to a signed 32-bit integer, and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per int16, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t scale( const int16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_i_as_i_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to a signed 16-bit integer input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per int16, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t scale( const int32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_i_as_i_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_i_as_i_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_k( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to a signed 16-bit integer input ndarray and assigns results to elements in a signed 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 2 }; // 2 bytes per int16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t scale( const int16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_k( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_t( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returned signed 16-bit integers to a signed 16-bit integer input ndarray, casts the callback's signed 16-bit integer return value to an unsigned 16-bit integer, and assigns results to elements in an unsigned 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 2 }; // 2 bytes per int16, 2 bytes per uint16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t abs( const int16_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_t( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_k_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to a signed 16-bit integer input ndarray, casts the callback's signed 16-bit integer return value to an unsigned 32-bit integer, and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per int16, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t abs( const int16_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_k_u( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_k_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_l_l( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 64-bit integers to a signed 64-bit integer input ndarray and assigns results to elements in a signed 64-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 8, 8 }; // 8 bytes per int64
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int64_t scale( const int64_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_l_l( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_l_l( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_l_v( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 64-bit integers to a signed 64-bit integer input ndarray, casts the callback's signed 64-bit integer return value to an unsigned 64-bit integer, and assigns results to elements in an unsigned 64-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 8, 8 }; // 8 bytes per int64, 8 bytes per uint64
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int64_t abs( const int64_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_l_v( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_l_v( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_b( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to an unsigned 8-bit integer, and assigns results to elements in an unsigned 8-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 1 }; // 1 byte per int8, 1 byte per uint8
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t abs( const int8_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_b( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 8 }; // 1 byte per int8, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t scale( const int8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a signed 8-bit integer input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 8 }; // 1 byte per int8, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per int8, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t scale( const int8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_f_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to a signed 8-bit integer input ndarray, casts the callback's double-precision floating-point return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per int8, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_f_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_f_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_f_as_f_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning single-precision floating-point numbers to a signed 8-bit integer input ndarray and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per int8, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+float scale( const float x ) {
+ return x + 10.0f;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_f_as_f_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_f_as_f_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a signed 32-bit integer, and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per int8, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t scale( const int8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_i_as_i_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to a signed 8-bit integer input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per int8, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t scale( const int32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_i_as_i_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_i_as_i_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_k( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a signed 16-bit integer, and assigns results to elements in a signed 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per int8, 2 bytes per int16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t scale( const int8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_k( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_k_as_k_k( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 16-bit integers to a signed 8-bit integer input ndarray and assigns results to elements in a signed 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per int8, 2 bytes per int16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int16_t scale( const int16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_k_as_k_k( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_k_as_k_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_s( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray and assigns results to elements in a signed 8-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 1 }; // 1 byte per int8
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t scale( const int8_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_s( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_t( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to an unsigned 16-bit integer, and assigns results to elements in an unsigned 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 2 }; // 1 byte per int8, 2 bytes per uint16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t abs( const int8_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_t( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_s_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to an unsigned 32-bit integer, and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 1, 4 }; // 1 byte per int8, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int8_t abs( const int8_t x ) {
+ if ( x < 0 ) {
+ return -x;
+ }
+ return x;
+}
+
+// Apply the callback:
+stdlib_ndarray_s_u( arrays, shape, strides, (void *)abs );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt8` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_s_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 16-bit integers to an unsigned 16-bit integer input ndarray, casts the callback's unsigned 16-bit integer return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 8 }; // 2 bytes per uint16, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint16_t scale( const uint16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to an unsigned 16-bit integer input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 8 }; // 2 bytes per uint16, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 16-bit integers to an unsigned 16-bit integer input ndarray, casts the callback's unsigned 16-bit integer return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint16_t scale( const uint16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_f_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to an unsigned 16-bit integer input ndarray, casts the callback's double-precision floating-point return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_f_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_f_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_f_as_f_f( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning single-precision floating-point numbers to an unsigned 16-bit integer input ndarray and assigns results to elements in a single-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per float
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+float scale( const float x ) {
+ return x + 10.0f;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_f_as_f_f( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_f_as_f_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 16-bit integers to an unsigned 16-bit integer input ndarray, casts the callback's unsigned 16-bit integer return value to a signed 32-bit integer, and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint16_t scale( const uint16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_i_as_i_i( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning signed 32-bit integers to an unsigned 16-bit integer input ndarray and assigns results to elements in a signed 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per int32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+int32_t scale( const int32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_i_as_i_i( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnInt32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_i_as_i_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_t( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 16-bit integers to an unsigned 16-bit integer input ndarray and assigns results to elements in an unsigned 16-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 2 }; // 2 bytes per uint16
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint16_t scale( const uint16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_t( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 16-bit integers to each element in an unsigned 16-bit integer input ndarray, casts the callback's unsigned 16-bit integer return value to an unsigned 32-bit integer, and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint16_t scale( const uint16_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_u( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint16` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_t_u_as_u_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 32-bit integers to an unsigned 16-bit integer input ndarray and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 2, 4 }; // 2 bytes per uint16, 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint32_t scale( const uint32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_t_u_as_u_u( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_t_u_as_u_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_u_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 32-bit integers to an unsigned 32-bit integer input ndarray, casts the callback's unsigned 32-bit integer return value to a double-precision floating-point number, and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per uint32, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint32_t scale( const uint32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_u_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_u_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_u_d_as_d_d( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning double-precision floating-point numbers to an unsigned 32-bit integer input ndarray and assigns results to elements in a double-precision floating-point output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 8 }; // 4 bytes per uint32, 8 bytes per double
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+double scale( const double x ) {
+ return x + 10.0;
+}
+
+// Apply the callback:
+stdlib_ndarray_u_d_as_d_d( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnFloat64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_u_d_as_d_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_u_u( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 32-bit integers to an unsigned 32-bit integer input ndarray and assigns results to elements in an unsigned 32-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 4, 4 }; // 4 bytes per uint32
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint32_t scale( const uint32_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_u_u( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint32` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_u_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+#### stdlib_ndarray_v_v( \*arrays[], \*shape, \*strides, \*fcn )
+
+Applies a unary callback accepting and returning unsigned 64-bit integers to an unsigned 64-bit integer input ndarray and assigns results to elements in an unsigned 64-bit integer output ndarray.
+
+```c
+#include
+
+// Create underlying byte arrays:
+uint8_t x[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+// Define a pointer to an array containing pointers to strided arrays:
+uint8_t *arrays[] = { x, out };
+
+// Define the strides:
+int64_t strides[] = { 8, 8 }; // 8 bytes per uint64
+
+// Define the number of elements over which to iterate:
+int64_t shape[] = { 3 };
+
+// Define a callback:
+uint64_t scale( const uint64_t x ) {
+ return x + 10;
+}
+
+// Apply the callback:
+stdlib_ndarray_v_v( arrays, shape, strides, (void *)scale );
+```
+
+The function accepts the following arguments:
+
+- **arrays**: `[inout] uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array.
+- **fcn**: `[in] void*` a `UnaryFcnUint64` function to apply provided as a `void` pointer.
+
+```c
+void stdlib_ndarray_v_v( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
+```
+
+
+
+* * *
+
+#### STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE
+
+Macro containing the preamble for a loop which operates on strided array elements.
+
+```c
+STDLIB_NDARRAY_UNARY_LOOP_PREMABLE {
+ // Loop body...
+}
+```
+
+The macro expects the following variables to be defined:
+
+- **arrays**: `uint8_t**` array whose first element is a pointer to a input ndarray and whose last element is a pointer to a output ndarray.
+- **shape**: `int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `int64_t*` array containing strides (in bytes) for each strided array.
+
+The macro defines the following variables:
+
+- **ip1**: `uint8_t*` pointer to the first indexed element of the input strided array.
+- **op1**: `uint8_t*` pointer to the first indexed element of the output strided array.
+- **is1**: `int64_t` index increment for the input strided array.
+- **os1**: `int64_t` index increment for the output strided array.
+- **n**: `int64_t` number of indexed elements.
+- **i**: `int64_t` loop counter.
+
+```c
+#define STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE \
+ uint8_t *ip1 = arrays[ 0 ]; \
+ uint8_t *op1 = arrays[ 1 ]; \
+ int64_t is1 = strides[ 0 ]; \
+ int64_t os1 = strides[ 1 ]; \
+ int64_t n = shape[ 0 ]; \
+ int64_t i; \
+ if ( n <= 0 ) { \
+ return; \
+ } \
+ if ( is1 < 0 ) { \
+ ip1 += (1-n) * is1; \
+ } \
+ if ( os1 < 0 ) { \
+ op1 += (1-n) * os1; \
+ } \
+ for ( i = 0; i < n; i++, ip1 += is1, op1 += os1 )
+```
+
+#### STDLIB_NDARRAY_UNARY_LOOP_TWO_OUT_PREAMBLE
+
+Macro containing the preamble for a loop which operates on strided array elements and updates two output ndarrays.
+
+```c
+STDLIB_NDARRAY_UNARY_LOOP_TWO_OUT_PREAMBLE {
+ // Loop body...
+}
+```
+
+The macro expects the following variables to be defined:
+
+- **arrays**: `uint8_t**` array whose first element is a pointer to a input ndarray and whose last two elements are pointers to output ndarrays.
+- **shape**: `int64_t*` array whose only element is the number of elements over which to iterate.
+- **strides**: `int64_t*` array containing strides (in bytes) for each strided array.
+
+The macro defines the following variables:
+
+- **ip1**: `uint8_t*` pointer to the first indexed element of the input strided array.
+- **op1**: `uint8_t*` pointer to the first indexed element of the first output strided array.
+- **op2**: `uint8_t*` pointer to the first indexed element of the second output strided array.
+- **is1**: `int64_t` index increment for the input strided array.
+- **os1**: `int64_t` index increment for the first output strided array.
+- **os2**: `int64_t` index increment for the second output strided array.
+- **n**: `int64_t` number of indexed elements.
+- **i**: `int64_t` loop counter.
+
+```c
+#define STDLIB_NDARRAY_UNARY_LOOP_TWO_OUT_PREAMBLE \
+ uint8_t *ip1 = arrays[ 0 ]; \
+ uint8_t *op1 = arrays[ 1 ]; \
+ uint8_t *op2 = arrays[ 2 ]; \
+ int64_t is1 = strides[ 0 ]; \
+ int64_t os1 = strides[ 1 ]; \
+ int64_t os2 = strides[ 2 ]; \
+ int64_t n = shape[ 0 ]; \
+ int64_t i; \
+ if ( n <= 0 ) { \
+ return; \
+ } \
+ if ( is1 < 0 ) { \
+ ip1 += (1-n) * is1; \
+ } \
+ if ( os1 < 0 ) { \
+ op1 += (1-n) * os1; \
+ } \
+ if ( os2 < 0 ) { \
+ op2 += (1-n) * os2; \
+ } \
+ for ( i = 0; i < n; i++, ip1 += os1, op1 += os1, op2 += os2 )
+```
+
+#### STDLIB_NDARRAY_UNARY_LOOP_INLINE( tin, tout, expr )
+
+Macro for a unary loop which inlines an expression.
+
+```c
+STDLIB_NDARRAY_UNARY_LOOP_INLINE( double, double, *out = in1 * in1 )
+```
+
+The macro expects the following arguments:
+
+- **tin**: input strided array element type.
+- **tout**: output strided array element type.
+- **expr**: expression to inline.
+
+In addition to the variables defined by the `STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE` macro, the macro defines the following variables:
+
+- **in1**: `` input strided array element.
+- **out**: `*` pointer to an output strided array element.
+
+The macro expects a provided expression to operate on `in1` and to store the result via `*out`.
+
+```c
+#define STDLIB_NDARRAY_UNARY_LOOP_INLINE( tin, tout, expr ) \
+ STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE { \
+ const tin in1 = *(tin *)ip1; \
+ tout *out = (tout *)op1; \
+ expr; \
+ }
+```
+
+#### STDLIB_NDARRAY_UNARY_LOOP_CLBK( tin, tout )
+
+Macro for a unary loop which invokes a callback.
+
+```c
+STDLIB_NDARRAY_UNARY_LOOP_CLBK( double, double )
+```
+
+The macro expects the following arguments:
+
+- **tin**: input strided array element data type.
+- **tout**: output strided array element data type.
+
+In addition to the variables expected by `STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE`, the macro expects the following variables to be defined:
+
+- **f**: unary callback.
+
+In addition to the variables defined by the `STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE`, the macro defines the following variables:
+
+- **x**: `` input strided array element.
+
+```c
+#define STDLIB_NDARRAY_UNARY_LOOP_CLBK( tin, tout ) \
+ STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE { \
+ const tin x = *(tin *)ip1; \
+ *(tout *)op1 = (tout)f( x ); \
+ }
+```
+
+#### STDLIB_NDARRAY_UNARY_LOOP_CLBK_ARG_CAST( tin, tout, fin )
+
+Macro for a unary loop which invokes a callback requiring arguments be explicitly cast to a different type.
+
+```c
+STDLIB_NDARRAY_UNARY_LOOP_CLBK_ARG_CAST( float, float, double )
+```
+
+The macro expects the following arguments:
+
+- **tin**: input strided array element data type.
+- **tout**: output strided array element data type.
+- **fin**: callback argument data type.
+
+In addition to the variables expected by `STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE`, the macro expects the following variables to be defined:
+
+- **f**: unary callback.
+
+In addition to the variables defined by the `STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE`, the macro defines the following variables:
+
+- **x**: `` input strided array element.
+
+```c
+#define STDLIB_NDARRAY_UNARY_LOOP_CLBK_ARG_CAST( tin, tout, fin ) \
+ STDLIB_NDARRAY_UNARY_LOOP_PREAMBLE { \
+ const tin x = *(tin *)ip1; \
+ *(tout *)op1 = (tout)f( (fin)x ); \
+ }
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+* * *
+
+
+
+### Examples
+
+```c
+#include "stdlib/ndarray/base/unary.h"
+#include
+#include
+#include
+
+// Define a callback:
+static double scale( const double x ) {
+ return x * 10.0;
+}
+
+int main() {
+ // Create underlying byte arrays:
+ uint8_t x[] = { 1, 4, 7 };
+ uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ // Define a pointer to an array containing pointers to strided arrays:
+ uint8_t *arrays[] = { x, out };
+
+ // Define the strides:
+ int64_t strides[] = { 1, 8 }; // 1 byte per uint8, 8 bytes per double
+
+ // Define the number of elements over which to iterate:
+ int64_t shape[] = { 3 };
+
+ // Apply the callback:
+ stdlib_ndarray_b_d_as_d_d( arrays, shape, strides, (void *)scale );
+
+ // Print the contents of the output array:
+ uint8_t *op1 = out;
+ for ( int64_t i = 0; i < shape[0]; i++, op1 += strides[1] ) {
+ const double v = *(double *)op1;
+ printf( "out[ %"PRId64" ] = %lf\n", i, v );
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
diff --git a/base/vind2bind/README.md b/base/vind2bind/README.md
index 2f448163..d6d169d2 100644
--- a/base/vind2bind/README.md
+++ b/base/vind2bind/README.md
@@ -156,6 +156,14 @@ for ( i = 0; i < len; i++ ) {
+
+
+
+
+
+
diff --git a/base/wrap-index/README.md b/base/wrap-index/README.md
index 59ceba27..89cdc027 100644
--- a/base/wrap-index/README.md
+++ b/base/wrap-index/README.md
@@ -102,6 +102,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/casting-modes/README.md b/casting-modes/README.md
index a4ef1854..00545b3a 100644
--- a/casting-modes/README.md
+++ b/casting-modes/README.md
@@ -122,6 +122,14 @@ bool = isMode( 'beep' );
+
+
+
+
+
+
diff --git a/ctor/README.md b/ctor/README.md
index 0d51fc04..2b1d8ece 100644
--- a/ctor/README.md
+++ b/ctor/README.md
@@ -3527,6 +3527,14 @@ int main() {
+
+
+
+
+
+
diff --git a/dispatch/README.md b/dispatch/README.md
index 4ded67d9..5cec389e 100644
--- a/dispatch/README.md
+++ b/dispatch/README.md
@@ -247,6 +247,16 @@ console.log( ybuf );
+
+
+
+
+
+
+
+
[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/ndarray/tree/main/ctor
diff --git a/dtypes/README.md b/dtypes/README.md
index 17e05439..839d6d20 100644
--- a/dtypes/README.md
+++ b/dtypes/README.md
@@ -124,6 +124,14 @@ bool = isdtype( 'beep' );
+
+
+
+
+
+
diff --git a/ind2sub/README.md b/ind2sub/README.md
index 800d1acc..09ebcde0 100644
--- a/ind2sub/README.md
+++ b/ind2sub/README.md
@@ -177,6 +177,14 @@ for ( i = 0; i < len; i++ ) {
+
+
+
+
+
+
diff --git a/index-modes/README.md b/index-modes/README.md
index 2fa20b78..4cc4ec37 100644
--- a/index-modes/README.md
+++ b/index-modes/README.md
@@ -114,6 +114,14 @@ bool = isMode( 'beep' );
+
+
+
+
+
+
diff --git a/min-dtype/README.md b/min-dtype/README.md
index 10c3fc13..4ceda651 100644
--- a/min-dtype/README.md
+++ b/min-dtype/README.md
@@ -117,6 +117,14 @@ for ( i = 0; i < 100; i++ ) {
+
+
+
+
+
+
diff --git a/next-dtype/README.md b/next-dtype/README.md
index 221496af..9fb97d27 100644
--- a/next-dtype/README.md
+++ b/next-dtype/README.md
@@ -120,6 +120,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/orders/README.md b/orders/README.md
index aab183e6..07ce80a1 100644
--- a/orders/README.md
+++ b/orders/README.md
@@ -110,6 +110,14 @@ bool = isOrder( 'beep' );
+
+
+
+
+
+
diff --git a/promotion-rules/README.md b/promotion-rules/README.md
index d115f191..49faca7a 100644
--- a/promotion-rules/README.md
+++ b/promotion-rules/README.md
@@ -133,6 +133,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/safe-casts/README.md b/safe-casts/README.md
index b2471539..8436be2d 100644
--- a/safe-casts/README.md
+++ b/safe-casts/README.md
@@ -119,6 +119,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/same-kind-casts/README.md b/same-kind-casts/README.md
index c2d431a5..42af5f86 100644
--- a/same-kind-casts/README.md
+++ b/same-kind-casts/README.md
@@ -119,6 +119,14 @@ for ( i = 0; i < DTYPES.length; i++ ) {
+
+
+
+
+
+
diff --git a/sub2ind/README.md b/sub2ind/README.md
index 6db3c52f..fec36f0c 100644
--- a/sub2ind/README.md
+++ b/sub2ind/README.md
@@ -181,6 +181,14 @@ for ( k = 0; k < shape[ 2 ]; k++ ) {
+
+
+
+
+
+