Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Sep 12, 2023
1 parent 653d200 commit f839e15
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions base/unary2d-by/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# unary2dBy

> Apply a unary callback to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.
> Apply a unary function to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.
<section class="intro">

Expand All @@ -38,7 +38,7 @@ var unary2dBy = require( '@stdlib/array/base/unary2d-by' );

#### unary2dBy( arrays, shape, fcn, clbk\[, thisArg] )

Applies a unary callback to each element retrieved from a two-dimensional nested input array according to a callback function and assigns results to elements in a two-dimensional nested output array.
Applies a unary function to each element retrieved from a two-dimensional nested input array according to a callback function and assigns results to elements in a two-dimensional nested output array.

```javascript
var abs = require( '@stdlib/math/base/special/abs' );
Expand All @@ -58,7 +58,9 @@ The function accepts the following arguments:

- **arrays**: array-like object containing one input nested array and one output nested array.
- **shape**: array shape.
- **fcn**: unary function to apply.
- **fcn**: unary function to apply to callback return values
- **clbk**: callback function.
- **thisArg**: callback function execution context (optional).

The invoked callback function is provided the following arguments:

Expand Down
2 changes: 1 addition & 1 deletion base/unary2d-by/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'use strict';

/**
* Apply a unary callback to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.
* Apply a unary function to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.
*
* @module @stdlib/array/base/unary2d-by
*
Expand Down
2 changes: 1 addition & 1 deletion base/unary2d-by/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MAIN //

/**
* Applies a unary callback to each element retrieved from a two-dimensional nested input array according to a callback function and assigns results to elements in a two-dimensional nested output array.
* Applies a unary function to each element retrieved from a two-dimensional nested input array according to a callback function and assigns results to elements in a two-dimensional nested output array.
*
* ## Notes
*
Expand Down
2 changes: 1 addition & 1 deletion base/unary2d-by/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/array/base/unary2d-by",
"version": "0.0.0",
"description": "Apply a unary callback to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.",
"description": "Apply a unary function to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
12 changes: 6 additions & 6 deletions base/unary2d-by/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ tape( 'the function applies a function to each nested input array element accord
t.end();
});

tape( 'the function does not invoke a provided callback if provided a shape having a first element equal to zero', function test( t ) {
tape( 'the function does not invoke provided functions if provided a shape having a first element equal to zero', function test( t ) {
var expected;
var shape;
var x;
Expand All @@ -100,17 +100,17 @@ tape( 'the function does not invoke a provided callback if provided a shape havi
expected = zeros2d( shape );

y = zeros2d( shape );
unary2dBy( [ x, y ], [ 0, 2 ], abs, clbk );
unary2dBy( [ x, y ], [ 0, 2 ], clbk, clbk );

t.deepEqual( y, expected, 'returns expected value' );
t.end();

function clbk() {
t.ok( false, 'should not invoke callback' );
t.ok( false, 'should not invoke function' );
}
});

tape( 'the function does not invoke a provided callback if provided a shape having a second element equal to zero', function test( t ) {
tape( 'the function does not invoke provided functions if provided a shape having a second element equal to zero', function test( t ) {
var expected;
var shape;
var x;
Expand All @@ -125,13 +125,13 @@ tape( 'the function does not invoke a provided callback if provided a shape havi
expected = zeros2d( shape );

y = zeros2d( shape );
unary2dBy( [ x, y ], [ 2, 0 ], abs, clbk );
unary2dBy( [ x, y ], [ 2, 0 ], clbk, clbk );

t.deepEqual( y, expected, 'returns expected value' );
t.end();

function clbk() {
t.ok( false, 'should not invoke callback' );
t.ok( false, 'should not invoke function' );
}
});

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit f839e15

Please sign in to comment.