From 1fbae5fff99954d533e5255cdcdca41f30361459 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 9 Nov 2023 02:12:57 +0000 Subject: [PATCH] Auto-generated commit --- .github/workflows/publish.yml | 52 +------------------ .../docs/types/index.d.ts | 40 +++++++++++++- .../docs/types/index.d.ts | 20 ++++++- .../docs/types/index.d.ts | 20 ++++++- .../docs/types/index.d.ts | 20 ++++++- .../docs/types/index.d.ts | 44 +++++++++++++++- .../docs/types/index.d.ts | 48 ++++++++++++----- .../docs/types/index.d.ts | 42 ++++++++++++++- .../broadcasted-unary2d/docs/types/index.d.ts | 38 +++++++++++++- .../broadcasted-unary3d/docs/types/index.d.ts | 18 ++++++- .../broadcasted-unary4d/docs/types/index.d.ts | 18 ++++++- .../broadcasted-unary5d/docs/types/index.d.ts | 18 ++++++- 12 files changed, 304 insertions(+), 74 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0037bdbc..e4a7c7c6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2021 The Stdlib Authors. +# Copyright (c) 2023 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ jobs: publish: # Define display name: - name: 'Publish package to npm' + name: 'Publish top-level package to npm' # Define the type of virtual host machine on which to run the job: runs-on: ubuntu-latest @@ -103,54 +103,6 @@ jobs: SLUG=${{ github.repository }} git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" --follow-tags - # Remove CLI: - - name: 'Remove CLI' - if: ${{ github.ref == 'refs/heads/main' }} - run: | - # Exit if the package does not have a CLI: - if ! grep -q '"bin":' package.json; then - exit 0 - fi - rm -rf ./bin/cli - rm -f test/test.cli.js - rm -f etc/cli_opts.json - rm -f docs/usage.txt - - # For all dependencies, check in all *.js files if they are still used; if not, remove them: - jq -r '.dependencies | keys[]' ./package.json | while read -r dep; do - dep=$(echo "$dep" | xargs) - if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then - jq --indent 2 "del(.dependencies[\"$dep\"])" ./package.json > ./package.json.tmp - mv ./package.json.tmp ./package.json - fi - done - jq -r '.devDependencies | keys[]' ./package.json | while read -r dep; do - if [[ "$dep" != "@stdlib"* ]]; then - continue - fi - dep=$(echo "$dep" | xargs) - if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then - jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp - mv ./package.json.tmp ./package.json - fi - done - - # Remove CLI section: - find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+?<\!\-\- \/.cli \-\->//" - - # Remove CLI from package.json: - jq -r 'del(.bin)' package.json > package.json.tmp - mv package.json.tmp package.json - - # Add entry for CLI package to See Also section of README.md: - cliPkgName=$(jq -r '.name' package.json)-cli - escapedPkg=$(echo "$cliPkgName" | sed -e 's/\//\\\//g') - escapedPkg=$(echo "$escapedPkg" | sed -e 's/\@/\\\@/g') - find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
(?:\n\n\* \* \*\n\n## See Also\n\n)?/
\n\n## See Also\n\n- [\`$escapedPkg\`][$escapedPkg]<\/span>: <\/span>CLI package for use as a command-line utility.<\/span>\n/" - - # Add link definition for CLI package to README.md: - find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
/
\n\n[$escapedPkg]: https:\/\/www.npmjs.com\/package\/$escapedPkg/" - # Replace GitHub MathJax equations with SVGs: - name: 'Replace GitHub MathJax equations with SVGs' run: | diff --git a/base/broadcasted-binary2d/docs/types/index.d.ts b/base/broadcasted-binary2d/docs/types/index.d.ts index 35099947..e1de7567 100644 --- a/base/broadcasted-binary2d/docs/types/index.d.ts +++ b/base/broadcasted-binary2d/docs/types/index.d.ts @@ -31,6 +31,44 @@ import { Shape1D, Shape2D } from '@stdlib/types/ndarray'; */ type Binary = ( v1: T, v2: U ) => V; +/** +* Input array. +*/ +type InputArray = Array1D | Array2D; + +/** +* Input array shape. +*/ +type InputArrayShape = Shape1D | Shape2D; + +/** +* Output array. +*/ +type OutputArray = Array2D; + +/** +* Output array shape. +*/ +type OutputArrayShape = Shape2D; + +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + InputArrayShape, + OutputArrayShape +]; + /** * Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a two-dimensional nested output array. * @@ -62,7 +100,7 @@ type Binary = ( v1: T, v2: U ) => V; * console.log( z ); * // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] */ -declare function bbinary2d( arrays: [ Array1D | Array2D, Array1D | Array2D, Array2D ], shapes: [ Shape1D | Shape2D, Shape1D | Shape2D, Shape2D ], fcn: Binary ): void; +declare function bbinary2d( arrays: InOutArrays, shapes: InOutShapes, fcn: Binary ): void; // EXPORTS // diff --git a/base/broadcasted-binary3d/docs/types/index.d.ts b/base/broadcasted-binary3d/docs/types/index.d.ts index 6247f096..94b8b134 100644 --- a/base/broadcasted-binary3d/docs/types/index.d.ts +++ b/base/broadcasted-binary3d/docs/types/index.d.ts @@ -51,6 +51,24 @@ type OutputArray = Array3D; */ type OutputArrayShape = Shape3D; +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + InputArrayShape, + OutputArrayShape +]; + /** * Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a three-dimensional nested output array. * @@ -82,7 +100,7 @@ type OutputArrayShape = Shape3D; * console.log( z ); * // => [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] */ -declare function bbinary3d( arrays: [ InputArray, InputArray, OutputArray ], shapes: [ InputArrayShape, InputArrayShape, OutputArrayShape ], fcn: Binary ): void; +declare function bbinary3d( arrays: InOutArrays, shapes: InOutShapes, fcn: Binary ): void; // EXPORTS // diff --git a/base/broadcasted-binary4d/docs/types/index.d.ts b/base/broadcasted-binary4d/docs/types/index.d.ts index beea6d14..b6e90aea 100644 --- a/base/broadcasted-binary4d/docs/types/index.d.ts +++ b/base/broadcasted-binary4d/docs/types/index.d.ts @@ -51,6 +51,24 @@ type OutputArray = Array4D; */ type OutputArrayShape = Shape4D; +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + InputArrayShape, + OutputArrayShape +]; + /** * Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a four-dimensional nested output array. * @@ -82,7 +100,7 @@ type OutputArrayShape = Shape4D; * console.log( z ); * // => [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] */ -declare function bbinary4d( arrays: [ InputArray, InputArray, OutputArray ], shapes: [ InputArrayShape, InputArrayShape, OutputArrayShape ], fcn: Binary ): void; +declare function bbinary4d( arrays: InOutArrays, shapes: InOutShapes, fcn: Binary ): void; // EXPORTS // diff --git a/base/broadcasted-binary5d/docs/types/index.d.ts b/base/broadcasted-binary5d/docs/types/index.d.ts index 45265cd0..28d4b24e 100644 --- a/base/broadcasted-binary5d/docs/types/index.d.ts +++ b/base/broadcasted-binary5d/docs/types/index.d.ts @@ -51,6 +51,24 @@ type OutputArray = Array5D; */ type OutputArrayShape = Shape5D; +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + InputArrayShape, + OutputArrayShape +]; + /** * Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a five-dimensional nested output array. * @@ -82,7 +100,7 @@ type OutputArrayShape = Shape5D; * console.log( z ); * // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ] */ -declare function bbinary5d( arrays: [ InputArray, InputArray, OutputArray ], shapes: [ InputArrayShape, InputArrayShape, OutputArrayShape ], fcn: Binary ): void; +declare function bbinary5d( arrays: InOutArrays, shapes: InOutShapes, fcn: Binary ): void; // EXPORTS // diff --git a/base/broadcasted-quaternary2d/docs/types/index.d.ts b/base/broadcasted-quaternary2d/docs/types/index.d.ts index 76aca16d..86f18269 100644 --- a/base/broadcasted-quaternary2d/docs/types/index.d.ts +++ b/base/broadcasted-quaternary2d/docs/types/index.d.ts @@ -31,6 +31,48 @@ import { Shape1D, Shape2D } from '@stdlib/types/ndarray'; */ type Quaternary = ( v1: T, v2: U, v3: V, v4: W ) => X; +/** +* Input array. +*/ +type InputArray = Array1D | Array2D; + +/** +* Input array shape. +*/ +type InputArrayShape = Shape1D | Shape2D; + +/** +* Output array. +*/ +type OutputArray = Array2D; + +/** +* Output array shape. +*/ +type OutputArrayShape = Shape2D; + +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + InputArray, + InputArray, + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + InputArrayShape, + InputArrayShape, + InputArrayShape, + OutputArrayShape +]; + /** * Applies a quaternary callback to elements in four broadcasted input arrays and assigns results to elements in a two-dimensional nested output array. * @@ -69,7 +111,7 @@ type Quaternary = ( v1: T, v2: U, v3: V, v4: W ) => X; * console.log( out ); * // => [ [ 4.0, 8.0 ], [ 12.0, 16.0 ] ] */ -declare function bquaternary2d( arrays: [ Array1D | Array2D, Array1D | Array2D, Array1D | Array2D, Array1D | Array2D, Array2D ], shapes: [ Shape1D | Shape2D, Shape1D | Shape2D, Shape1D | Shape2D, Shape1D | Shape2D, Shape2D ], fcn: Quaternary ): void; +declare function bquaternary2d( arrays: InOutArrays, shapes: InOutShapes, fcn: Quaternary ): void; // EXPORTS // diff --git a/base/broadcasted-quinary2d/docs/types/index.d.ts b/base/broadcasted-quinary2d/docs/types/index.d.ts index 81d7b8cc..a5bb8e9f 100644 --- a/base/broadcasted-quinary2d/docs/types/index.d.ts +++ b/base/broadcasted-quinary2d/docs/types/index.d.ts @@ -32,27 +32,47 @@ import { Shape1D, Shape2D } from '@stdlib/types/ndarray'; type Quinary = ( v1: T, v2: U, v3: V, v4: W, v5: X ) => Y; /** -* List of input and output arrays. +* Input array. +*/ +type InputArray = Array1D | Array2D; + +/** +* Input array shape. +*/ +type InputArrayShape = Shape1D | Shape2D; + +/** +* Output array. +*/ +type OutputArray = Array2D; + +/** +* Output array shape. +*/ +type OutputArrayShape = Shape2D; + +/** +* Input and output arrays. */ type InOutArrays = [ - Array1D | Array2D, - Array1D | Array2D, - Array1D | Array2D, - Array1D | Array2D, - Array1D | Array2D, - Array2D + InputArray, + InputArray, + InputArray, + InputArray, + InputArray, + OutputArray ]; /** -* List of input and output array shapes. +* Input and output array shapes. */ type InOutShapes = [ - Shape1D | Shape2D, - Shape1D | Shape2D, - Shape1D | Shape2D, - Shape1D | Shape2D, - Shape1D | Shape2D, - Shape2D + InputArrayShape, + InputArrayShape, + InputArrayShape, + InputArrayShape, + InputArrayShape, + OutputArrayShape ]; /** diff --git a/base/broadcasted-ternary2d/docs/types/index.d.ts b/base/broadcasted-ternary2d/docs/types/index.d.ts index 7abe06c1..e65d154e 100644 --- a/base/broadcasted-ternary2d/docs/types/index.d.ts +++ b/base/broadcasted-ternary2d/docs/types/index.d.ts @@ -31,6 +31,46 @@ import { Shape1D, Shape2D } from '@stdlib/types/ndarray'; */ type Ternary = ( v1: T, v2: U, v3: V ) => W; +/** +* Input array. +*/ +type InputArray = Array1D | Array2D; + +/** +* Input array shape. +*/ +type InputArrayShape = Shape1D | Shape2D; + +/** +* Output array. +*/ +type OutputArray = Array2D; + +/** +* Output array shape. +*/ +type OutputArrayShape = Shape2D; + +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + InputArray, + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + InputArrayShape, + InputArrayShape, + OutputArrayShape +]; + /** * Applies a ternary callback to elements in three broadcasted input arrays and assigns results to elements in a two-dimensional nested output array. * @@ -67,7 +107,7 @@ type Ternary = ( v1: T, v2: U, v3: V ) => W; * console.log( out ); * // => [ [ 3.0, 6.0 ], [ 9.0, 12.0 ] ] */ -declare function bternary2d( arrays: [ Array1D | Array2D, Array1D | Array2D, Array1D | Array2D, Array2D ], shapes: [ Shape1D | Shape2D, Shape1D | Shape2D, Shape1D | Shape2D, Shape2D ], fcn: Ternary ): void; +declare function bternary2d( arrays: InOutArrays, shapes: InOutShapes, fcn: Ternary ): void; // EXPORTS // diff --git a/base/broadcasted-unary2d/docs/types/index.d.ts b/base/broadcasted-unary2d/docs/types/index.d.ts index 7b329996..c8c188b6 100644 --- a/base/broadcasted-unary2d/docs/types/index.d.ts +++ b/base/broadcasted-unary2d/docs/types/index.d.ts @@ -31,6 +31,42 @@ import { Shape1D, Shape2D } from '@stdlib/types/ndarray'; */ type Unary = ( value: T ) => U; +/** +* Input array. +*/ +type InputArray = Array1D | Array2D; + +/** +* Input array shape. +*/ +type InputArrayShape = Shape1D | Shape2D; + +/** +* Output array. +*/ +type OutputArray = Array2D; + +/** +* Output array shape. +*/ +type OutputArrayShape = Shape2D; + +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + OutputArrayShape +]; + /** * Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a two-dimensional nested output array. * @@ -63,7 +99,7 @@ type Unary = ( value: T ) => U; * console.log( y ); * // => [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ] */ -declare function bunary2d( arrays: [ Array1D | Array2D, Array2D ], shapes: [ Shape1D | Shape2D, Shape2D ], fcn: Unary ): void; +declare function bunary2d( arrays: InOutArrays, shapes: InOutShapes, fcn: Unary ): void; // EXPORTS // diff --git a/base/broadcasted-unary3d/docs/types/index.d.ts b/base/broadcasted-unary3d/docs/types/index.d.ts index 7de41351..9d49aab3 100644 --- a/base/broadcasted-unary3d/docs/types/index.d.ts +++ b/base/broadcasted-unary3d/docs/types/index.d.ts @@ -51,6 +51,22 @@ type OutputArray = Array3D; */ type OutputArrayShape = Shape3D; +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + OutputArrayShape +]; + /** * Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a three-dimensional nested output array. * @@ -83,7 +99,7 @@ type OutputArrayShape = Shape3D; * console.log( y ); * // => [ [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ] ] */ -declare function bunary3d( arrays: [ InputArray, OutputArray ], shapes: [ InputArrayShape, OutputArrayShape ], fcn: Unary ): void; +declare function bunary3d( arrays: InOutArrays, shapes: InOutShapes, fcn: Unary ): void; // EXPORTS // diff --git a/base/broadcasted-unary4d/docs/types/index.d.ts b/base/broadcasted-unary4d/docs/types/index.d.ts index f1657dd2..b0e55b12 100644 --- a/base/broadcasted-unary4d/docs/types/index.d.ts +++ b/base/broadcasted-unary4d/docs/types/index.d.ts @@ -51,6 +51,22 @@ type OutputArray = Array4D; */ type OutputArrayShape = Shape4D; +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + OutputArrayShape +]; + /** * Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a four-dimensional nested output array. * @@ -83,7 +99,7 @@ type OutputArrayShape = Shape4D; * console.log( y ); * // => [ [ [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ] ] ] */ -declare function bunary4d( arrays: [ InputArray, OutputArray ], shapes: [ InputArrayShape, OutputArrayShape ], fcn: Unary ): void; +declare function bunary4d( arrays: InOutArrays, shapes: InOutShapes, fcn: Unary ): void; // EXPORTS // diff --git a/base/broadcasted-unary5d/docs/types/index.d.ts b/base/broadcasted-unary5d/docs/types/index.d.ts index 0889535b..a1841c0d 100644 --- a/base/broadcasted-unary5d/docs/types/index.d.ts +++ b/base/broadcasted-unary5d/docs/types/index.d.ts @@ -51,6 +51,22 @@ type OutputArray = Array5D; */ type OutputArrayShape = Shape5D; +/** +* Input and output arrays. +*/ +type InOutArrays = [ + InputArray, + OutputArray +]; + +/** +* Input and output array shapes. +*/ +type InOutShapes = [ + InputArrayShape, + OutputArrayShape +]; + /** * Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a five-dimensional nested output array. * @@ -83,7 +99,7 @@ type OutputArrayShape = Shape5D; * console.log( y ); * // => [ [ [ [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ] ] ] ] */ -declare function bunary5d( arrays: [ InputArray, OutputArray ], shapes: [ InputArrayShape, OutputArrayShape ], fcn: Unary ): void; +declare function bunary5d( arrays: InOutArrays, shapes: InOutShapes, fcn: Unary ): void; // EXPORTS //