Skip to content

Commit 9deb931

Browse files
committed
chore: clean-up
1 parent d78524d commit 9deb931

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

lib/node_modules/@stdlib/array/base/unary5d-by/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function main() {
129129
N = floor( pow( pow( 10, i ), 1.0/5.0 ) );
130130
sh = [ N, N, N, N, N ];
131131
f = createBenchmark( sh );
132-
bench( pkg+'::square_matrix:size='+numel( sh ), f );
132+
bench( pkg+'::equidimensional:size='+numel( sh ), f );
133133
}
134134
}
135135

lib/node_modules/@stdlib/array/base/unary5d-by/lib/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
// MAIN //
2323

2424
/**
25-
* Applies a unary function to each element retrieved from a five-dimensional nested input array according to a callback function and assigns results to elements in a fiv5-dimensional nested output array.
25+
* Applies a unary function to each element retrieved from a five-dimensional nested input array according to a callback function and assigns results to elements in a five-dimensional nested output array.
2626
*
2727
* ## Notes
2828
*
2929
* - The function assumes that the input and output arrays have the same shape.
3030
*
31-
* @param {ArrayLikeObject<Array<Collection>>} arrays - array-like object containing one input nested array and one output nested array
31+
* @param {ArrayLikeObject<Array>} arrays - array-like object containing one input nested array and one output nested array
3232
* @param {NonNegativeIntegerArray} shape - array shape
3333
* @param {Function} fcn - unary function to apply to callback return values
3434
* @param {Callback} clbk - callback function
@@ -107,7 +107,7 @@ function unary5dBy( arrays, shape, fcn, clbk ) {
107107
x0 = x1[ i1 ];
108108
y0 = y1[ i1 ];
109109
for ( i0 = 0; i0 < S0; i0++ ) {
110-
v = clbk.call( thisArg, x0[ i0 ], [ i4, i3, i2, i1, i0 ], [ x, y ] ); // eslint-disable max-len
110+
v = clbk.call( thisArg, x0[ i0 ], [ i4, i3, i2, i1, i0 ], [ x, y ] ); // eslint-disable-line max-len
111111
if ( v !== void 0 ) {
112112
y0[ i0 ] = fcn( v );
113113
}

lib/node_modules/@stdlib/array/base/unary5d-by/test/test.js

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tape( 'the function does not invoke provided functions if provided a shape havin
130130
expected = zeros5d( shape );
131131

132132
y = zeros5d( shape );
133-
unary5dBy( [ x, y ], [ 1, 0, 1, 2, 2 ], clbk, clbk );
133+
unary5dBy( [ x, y ], [ 0, 1, 1, 2, 2 ], clbk, clbk );
134134

135135
t.deepEqual( y, expected, 'returns expected value' );
136136
t.end();
@@ -161,7 +161,7 @@ tape( 'the function does not invoke provided functions if provided a shape havin
161161
expected = zeros5d( shape );
162162

163163
y = zeros5d( shape );
164-
unary5dBy( [ x, y ], [ 1, 1, 0, 2, 2 ], clbk, clbk );
164+
unary5dBy( [ x, y ], [ 1, 0, 1, 2, 2 ], clbk, clbk );
165165

166166
t.deepEqual( y, expected, 'returns expected value' );
167167
t.end();
@@ -177,6 +177,37 @@ tape( 'the function does not invoke provided functions if provided a shape havin
177177
var x;
178178
var y;
179179

180+
shape = [ 1, 1, 1, 2, 2 ];
181+
x = [
182+
[
183+
[
184+
[
185+
[ -1.0, -2.0 ],
186+
[ -3.0, -4.0 ]
187+
]
188+
]
189+
]
190+
];
191+
192+
expected = zeros5d( shape );
193+
194+
y = zeros5d( shape );
195+
unary5dBy( [ x, y ], [ 1, 1, 0, 2, 2 ], clbk, clbk );
196+
197+
t.deepEqual( y, expected, 'returns expected value' );
198+
t.end();
199+
200+
function clbk() {
201+
t.ok( false, 'should not invoke function' );
202+
}
203+
});
204+
205+
tape( 'the function does not invoke provided functions if provided a shape having a fourth element equal to zero', function test( t ) {
206+
var expected;
207+
var shape;
208+
var x;
209+
var y;
210+
180211
shape = [ 1, 1, 1, 2, 2 ];
181212
x = [
182213
[
@@ -200,7 +231,7 @@ tape( 'the function does not invoke provided functions if provided a shape havin
200231
}
201232
});
202233

203-
tape( 'the function does not invoke provided functions if provided a shape having a fourth element equal to zero', function test( t ) {
234+
tape( 'the function does not invoke provided functions if provided a shape having a five element equal to zero', function test( t ) {
204235
var expected;
205236
var shape;
206237
var x;

0 commit comments

Comments
 (0)