@stdlib/array-base-binary5d 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -64,7 +64,7 @@ var binary5d = require( '@stdlib/array-base-binary5d' );
64
64
  Applies a binary callback to elements in two five-dimensional nested input arrays and assigns results to elements in a five-dimensional nested output array.
65
65
 
66
66
  ```javascript
67
- var add = require( '@stdlib/math-base-ops-add' );
67
+ var add = require( '@stdlib/number-float64-base-add' );
68
68
  var zeros5d = require( '@stdlib/array-base-zeros5d' );
69
69
 
70
70
  var x = [ [ [ [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ] ] ];
@@ -106,7 +106,7 @@ The function accepts the following arguments:
106
106
  var discreteUniform = require( '@stdlib/random-base-discrete-uniform' ).factory;
107
107
  var filled5dBy = require( '@stdlib/array-base-filled5d-by' );
108
108
  var zeros5d = require( '@stdlib/array-base-zeros5d' );
109
- var add = require( '@stdlib/math-base-ops-add' );
109
+ var add = require( '@stdlib/number-float64-base-add' );
110
110
  var binary5d = require( '@stdlib/array-base-binary5d' );
111
111
 
112
112
  var shape = [ 1, 2, 2, 3, 3 ];
@@ -162,7 +162,7 @@ See [LICENSE][stdlib-license].
162
162
 
163
163
  ## Copyright
164
164
 
165
- Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
165
+ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
166
166
 
167
167
  </section>
168
168
 
@@ -175,8 +175,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
175
175
  [npm-image]: http://img.shields.io/npm/v/@stdlib/array-base-binary5d.svg
176
176
  [npm-url]: https://npmjs.org/package/@stdlib/array-base-binary5d
177
177
 
178
- [test-image]: https://github.com/stdlib-js/array-base-binary5d/actions/workflows/test.yml/badge.svg?branch=v0.2.2
179
- [test-url]: https://github.com/stdlib-js/array-base-binary5d/actions/workflows/test.yml?query=branch:v0.2.2
178
+ [test-image]: https://github.com/stdlib-js/array-base-binary5d/actions/workflows/test.yml/badge.svg?branch=v0.2.3
179
+ [test-url]: https://github.com/stdlib-js/array-base-binary5d/actions/workflows/test.yml?query=branch:v0.2.3
180
180
 
181
181
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-base-binary5d/main.svg
182
182
  [coverage-url]: https://codecov.io/github/stdlib-js/array-base-binary5d?branch=main
@@ -188,8 +188,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
188
188
 
189
189
  -->
190
190
 
191
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
192
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
191
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
192
+ [chat-url]: https://stdlib.zulipchat.com
193
193
 
194
194
  [stdlib]: https://github.com/stdlib-js/stdlib
195
195
 
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/main.js", "../lib/index.js"],
4
- "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two five-dimensional nested input arrays and assigns results to elements in a five-dimensional nested output array.\n*\n* ## Notes\n*\n* - The function assumes that the input and output arrays have the same shape.\n*\n* @param {ArrayLikeObject<Array<Collection>>} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones5d = require( '@stdlib/array-base-ones5d' );\n* var zeros5d = require( '@stdlib/array-base-zeros5d' );\n* var add = require( '@stdlib/math-base-ops-add' );\n*\n* var shape = [ 1, 1, 2, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = zeros5d( shape );\n*\n* binary5d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\nfunction binary5d( arrays, shape, fcn ) {\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar x3;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\tvar y3;\n\tvar z0;\n\tvar z1;\n\tvar z2;\n\tvar z3;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tS0 = shape[ 4 ];\n\tS1 = shape[ 3 ];\n\tS2 = shape[ 2 ];\n\tS3 = shape[ 1 ];\n\tS4 = shape[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 || S3 <= 0 || S4 <= 0 ) {\n\t\treturn;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tx3 = x[ i4 ];\n\t\ty3 = y[ i4 ];\n\t\tz3 = z[ i4 ];\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tx2 = x3[ i3 ];\n\t\t\ty2 = y3[ i3 ];\n\t\t\tz2 = z3[ i3 ];\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tx1 = x2[ i2 ];\n\t\t\t\ty1 = y2[ i2 ];\n\t\t\t\tz1 = z2[ i2 ];\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tx0 = x1[ i1 ];\n\t\t\t\t\ty0 = y1[ i1 ];\n\t\t\t\t\tz0 = z1[ i1 ];\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tz0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = binary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a binary callback to elements in two five-dimensional nested input arrays and assign results to elements in a five-dimensional nested output array.\n*\n* @module @stdlib/array-base-binary5d\n*\n* @example\n* var ones5d = require( '@stdlib/array-base-ones5d' );\n* var zeros5d = require( '@stdlib/array-base-zeros5d' );\n* var add = require( '@stdlib/math-base-ops-add' );\n* var binary5d = require( '@stdlib/array-base-binary5d' );\n*\n* var shape = [ 1, 1, 2, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = zeros5d( shape );\n*\n* binary5d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two five-dimensional nested input arrays and assigns results to elements in a five-dimensional nested output array.\n*\n* ## Notes\n*\n* - The function assumes that the input and output arrays have the same shape.\n*\n* @param {ArrayLikeObject<Array<Collection>>} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones5d = require( '@stdlib/array-base-ones5d' );\n* var zeros5d = require( '@stdlib/array-base-zeros5d' );\n* var add = require( '@stdlib/number-float64-base-add' );\n*\n* var shape = [ 1, 1, 2, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = zeros5d( shape );\n*\n* binary5d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\nfunction binary5d( arrays, shape, fcn ) {\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar x3;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\tvar y3;\n\tvar z0;\n\tvar z1;\n\tvar z2;\n\tvar z3;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tS0 = shape[ 4 ];\n\tS1 = shape[ 3 ];\n\tS2 = shape[ 2 ];\n\tS3 = shape[ 1 ];\n\tS4 = shape[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 || S3 <= 0 || S4 <= 0 ) {\n\t\treturn;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tx3 = x[ i4 ];\n\t\ty3 = y[ i4 ];\n\t\tz3 = z[ i4 ];\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tx2 = x3[ i3 ];\n\t\t\ty2 = y3[ i3 ];\n\t\t\tz2 = z3[ i3 ];\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tx1 = x2[ i2 ];\n\t\t\t\ty1 = y2[ i2 ];\n\t\t\t\tz1 = z2[ i2 ];\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tx0 = x1[ i1 ];\n\t\t\t\t\ty0 = y1[ i1 ];\n\t\t\t\t\tz0 = z1[ i1 ];\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tz0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = binary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a binary callback to elements in two five-dimensional nested input arrays and assign results to elements in a five-dimensional nested output array.\n*\n* @module @stdlib/array-base-binary5d\n*\n* @example\n* var ones5d = require( '@stdlib/array-base-ones5d' );\n* var zeros5d = require( '@stdlib/array-base-zeros5d' );\n* var add = require( '@stdlib/number-float64-base-add' );\n* var binary5d = require( '@stdlib/array-base-binary5d' );\n*\n* var shape = [ 1, 1, 2, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = zeros5d( shape );\n*\n* binary5d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
5
5
  "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAkDA,SAASC,EAAUC,EAAQC,EAAOC,EAAM,CACvC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAOJ,GALAxB,EAAKF,EAAO,CAAE,EACdG,EAAKH,EAAO,CAAE,EACdI,EAAKJ,EAAO,CAAE,EACdK,EAAKL,EAAO,CAAE,EACdM,EAAKN,EAAO,CAAE,EACT,EAAAE,GAAM,GAAKC,GAAM,GAAKC,GAAM,GAAKC,GAAM,GAAKC,GAAM,GAMvD,IAHAkB,EAAIzB,EAAQ,CAAE,EACd0B,EAAI1B,EAAQ,CAAE,EACd2B,EAAI3B,EAAQ,CAAE,EACRY,EAAK,EAAGA,EAAKL,EAAIK,IAItB,IAHAI,EAAKS,EAAGb,CAAG,EACXQ,EAAKM,EAAGd,CAAG,EACXY,EAAKG,EAAGf,CAAG,EACLD,EAAK,EAAGA,EAAKL,EAAIK,IAItB,IAHAI,EAAKC,EAAIL,CAAG,EACZQ,EAAKC,EAAIT,CAAG,EACZY,EAAKC,EAAIb,CAAG,EACND,EAAK,EAAGA,EAAKL,EAAIK,IAItB,IAHAI,EAAKC,EAAIL,CAAG,EACZQ,EAAKC,EAAIT,CAAG,EACZY,EAAKC,EAAIb,CAAG,EACND,EAAK,EAAGA,EAAKL,EAAIK,IAItB,IAHAI,EAAKC,EAAIL,CAAG,EACZQ,EAAKC,EAAIT,CAAG,EACZY,EAAKC,EAAIb,CAAG,EACND,EAAK,EAAGA,EAAKL,EAAIK,IACtBa,EAAIb,CAAG,EAAIN,EAAKW,EAAIL,CAAG,EAAGS,EAAIT,CAAG,CAAE,CAMzC,CAKAV,EAAO,QAAUC,ICvEjB,IAAI6B,EAAO,IAKX,OAAO,QAAUA",
6
6
  "names": ["require_main", "__commonJSMin", "exports", "module", "binary5d", "arrays", "shape", "fcn", "S0", "S1", "S2", "S3", "S4", "i0", "i1", "i2", "i3", "i4", "x0", "x1", "x2", "x3", "y0", "y1", "y2", "y3", "z0", "z1", "z2", "z3", "x", "y", "z", "main"]
7
7
  }
@@ -46,7 +46,7 @@ type Binary<T, U, V> = ( v1: T, v2: U ) => V;
46
46
  * @example
47
47
  * var ones5d = require( '@stdlib/array-base-ones5d' );
48
48
  * var zeros5d = require( '@stdlib/array-base-zeros5d' );
49
- * var add = require( '@stdlib/math-base-ops-add' );
49
+ * var add = require( '@stdlib/number-float64-base-add' );
50
50
  *
51
51
  * var shape = [ 1, 1, 2, 2, 2 ];
52
52
  *
package/lib/index.js CHANGED
@@ -26,7 +26,7 @@
26
26
  * @example
27
27
  * var ones5d = require( '@stdlib/array-base-ones5d' );
28
28
  * var zeros5d = require( '@stdlib/array-base-zeros5d' );
29
- * var add = require( '@stdlib/math-base-ops-add' );
29
+ * var add = require( '@stdlib/number-float64-base-add' );
30
30
  * var binary5d = require( '@stdlib/array-base-binary5d' );
31
31
  *
32
32
  * var shape = [ 1, 1, 2, 2, 2 ];
package/lib/main.js CHANGED
@@ -35,7 +35,7 @@
35
35
  * @example
36
36
  * var ones5d = require( '@stdlib/array-base-ones5d' );
37
37
  * var zeros5d = require( '@stdlib/array-base-zeros5d' );
38
- * var add = require( '@stdlib/math-base-ops-add' );
38
+ * var add = require( '@stdlib/number-float64-base-add' );
39
39
  *
40
40
  * var shape = [ 1, 1, 2, 2, 2 ];
41
41
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/array-base-binary5d",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Apply a binary callback to elements in two five-dimensional nested input arrays and assign results to elements in a five-dimensional nested output array.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -60,7 +60,6 @@
60
60
  "map",
61
61
  "transform"
62
62
  ],
63
- "__stdlib__": {},
64
63
  "funding": {
65
64
  "type": "opencollective",
66
65
  "url": "https://opencollective.com/stdlib"