Skip to content

Commit e438091

Browse files
committed
Auto-generated commit
1 parent db74045 commit e438091

File tree

6 files changed

+17
-242
lines changed

6 files changed

+17
-242
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ jobs:
182182
fi
183183
# Trim leading and trailing whitespace:
184184
dep=$(echo "$dep" | xargs)
185-
version="^$(npm view $dep version)"
185+
version="$(npm view $dep version)"
186+
if [[ -z "$version" ]]; then
187+
continue
188+
fi
189+
version="^$version"
186190
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
187191
mv package.json.tmp package.json
188192
done
@@ -192,7 +196,11 @@ jobs:
192196
fi
193197
# Trim leading and trailing whitespace:
194198
dep=$(echo "$dep" | xargs)
195-
version="^$(npm view $dep version)"
199+
version="$(npm view $dep version)"
200+
if [[ -z "$version" ]]; then
201+
continue
202+
fi
203+
version="^$version"
196204
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
197205
mv package.json.tmp package.json
198206
done

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
3737
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
3838
orimiles5 <97595296+orimiles5@users.noreply.github.com>
3939
rei2hu <reimu@reimu.ws>
40+
rgizz <gztown2216@yahoo.com>

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @param {ArrayLikeObject<Array<Collection>>} arrays - array-like object containing two input nested arrays and one output nested array
3131
* @param {NonNegativeIntegerArray} shape - array shape
32-
* @param {Callback} fcn - unary callback
32+
* @param {Callback} fcn - binary callback
3333
* @returns {void}
3434
*
3535
* @example

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@stdlib/bench": "^0.1.0",
4646
"@stdlib/math-base-assert-is-nan": "^0.1.1",
4747
"@stdlib/math-base-ops-add": "^0.1.0",
48-
"@stdlib/math-base-special-floor": "^0.1.0",
48+
"@stdlib/math-base-special-floor": "^0.1.1",
4949
"@stdlib/math-base-special-pow": "^0.1.0",
5050
"@stdlib/ndarray-base-numel": "^0.1.1",
5151
"@stdlib/random-base-discrete-uniform": "^0.1.0",

test/dist/test.js

Lines changed: 3 additions & 237 deletions
Original file line numberDiff line numberDiff line change
@@ -21,247 +21,13 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var add = require( '@stdlib/math-base-ops-add' );
25-
var zeros4d = require( '@stdlib/array-base-zeros4d' );
26-
var binary4d = require( './../../dist' );
24+
var main = require( './../../dist' );
2725

2826

2927
// TESTS //
3028

31-
tape( 'main export is a function', function test( t ) {
29+
tape( 'main export is defined', function test( t ) {
3230
t.ok( true, __filename );
33-
t.strictEqual( typeof binary4d, 'function', 'main export is a function' );
31+
t.strictEqual( main !== void 0, true, 'main export is defined' );
3432
t.end();
3533
});
36-
37-
tape( 'the function applies a provided callback to nested input arrays and assigns results to a nested output array', function test( t ) {
38-
var expected;
39-
var shape;
40-
var x;
41-
var y;
42-
var z;
43-
44-
shape = [ 1, 2, 2, 2 ];
45-
x = [
46-
[
47-
[
48-
[ 1.0, 2.0 ],
49-
[ 3.0, 4.0 ]
50-
],
51-
[
52-
[ 1.0, 2.0 ],
53-
[ 3.0, 4.0 ]
54-
]
55-
]
56-
];
57-
y = [
58-
[
59-
[
60-
[ 5.0, 6.0 ],
61-
[ 7.0, 8.0 ]
62-
],
63-
[
64-
[ 5.0, 6.0 ],
65-
[ 7.0, 8.0 ]
66-
]
67-
]
68-
];
69-
z = zeros4d( shape );
70-
71-
expected = [
72-
[
73-
[
74-
[ 6.0, 8.0 ],
75-
[ 10.0, 12.0 ]
76-
],
77-
[
78-
[ 6.0, 8.0 ],
79-
[ 10.0, 12.0 ]
80-
]
81-
]
82-
];
83-
binary4d( [ x, y, z ], shape, add );
84-
85-
t.deepEqual( z, expected, 'returns expected value' );
86-
t.end();
87-
});
88-
89-
tape( 'the function does not invoke a provided callback if provided a shape having a first element equal to zero', function test( t ) {
90-
var expected;
91-
var shape;
92-
var x;
93-
var y;
94-
var z;
95-
96-
shape = [ 1, 2, 2, 2 ];
97-
x = [
98-
[
99-
[
100-
[ 1.0, 2.0 ],
101-
[ 3.0, 4.0 ]
102-
],
103-
[
104-
[ 1.0, 2.0 ],
105-
[ 3.0, 4.0 ]
106-
]
107-
]
108-
];
109-
y = [
110-
[
111-
[
112-
[ 5.0, 6.0 ],
113-
[ 7.0, 8.0 ]
114-
],
115-
[
116-
[ 5.0, 6.0 ],
117-
[ 7.0, 8.0 ]
118-
]
119-
]
120-
];
121-
z = zeros4d( shape );
122-
123-
expected = zeros4d( shape );
124-
binary4d( [ x, y, z ], [ 0, 2, 2, 2 ], clbk );
125-
126-
t.deepEqual( z, expected, 'returns expected value' );
127-
t.end();
128-
129-
function clbk() {
130-
t.ok( false, 'should not invoke callback' );
131-
}
132-
});
133-
134-
tape( 'the function does not invoke a provided callback if provided a shape having a second element equal to zero', function test( t ) {
135-
var expected;
136-
var shape;
137-
var x;
138-
var y;
139-
var z;
140-
141-
shape = [ 1, 2, 2, 2 ];
142-
x = [
143-
[
144-
[
145-
[ 1.0, 2.0 ],
146-
[ 3.0, 4.0 ]
147-
],
148-
[
149-
[ 1.0, 2.0 ],
150-
[ 3.0, 4.0 ]
151-
]
152-
]
153-
];
154-
y = [
155-
[
156-
[
157-
[ 5.0, 6.0 ],
158-
[ 7.0, 8.0 ]
159-
],
160-
[
161-
[ 5.0, 6.0 ],
162-
[ 7.0, 8.0 ]
163-
]
164-
]
165-
];
166-
z = zeros4d( shape );
167-
168-
expected = zeros4d( shape );
169-
binary4d( [ x, y, z ], [ 2, 0, 2, 2 ], clbk );
170-
171-
t.deepEqual( z, expected, 'returns expected value' );
172-
t.end();
173-
174-
function clbk() {
175-
t.ok( false, 'should not invoke callback' );
176-
}
177-
});
178-
179-
tape( 'the function does not invoke a provided callback if provided a shape having a third element equal to zero', function test( t ) {
180-
var expected;
181-
var shape;
182-
var x;
183-
var y;
184-
var z;
185-
186-
shape = [ 1, 2, 2, 2 ];
187-
x = [
188-
[
189-
[
190-
[ 1.0, 2.0 ],
191-
[ 3.0, 4.0 ]
192-
],
193-
[
194-
[ 1.0, 2.0 ],
195-
[ 3.0, 4.0 ]
196-
]
197-
]
198-
];
199-
y = [
200-
[
201-
[
202-
[ 5.0, 6.0 ],
203-
[ 7.0, 8.0 ]
204-
],
205-
[
206-
[ 5.0, 6.0 ],
207-
[ 7.0, 8.0 ]
208-
]
209-
]
210-
];
211-
z = zeros4d( shape );
212-
213-
expected = zeros4d( shape );
214-
binary4d( [ x, y, z ], [ 2, 2, 0, 2 ], clbk );
215-
216-
t.deepEqual( z, expected, 'returns expected value' );
217-
t.end();
218-
219-
function clbk() {
220-
t.ok( false, 'should not invoke callback' );
221-
}
222-
});
223-
224-
tape( 'the function does not invoke a provided callback if provided a shape having a four element equal to zero', function test( t ) {
225-
var expected;
226-
var shape;
227-
var x;
228-
var y;
229-
var z;
230-
231-
shape = [ 1, 2, 2, 2 ];
232-
x = [
233-
[
234-
[
235-
[ 1.0, 2.0 ],
236-
[ 3.0, 4.0 ]
237-
],
238-
[
239-
[ 1.0, 2.0 ],
240-
[ 3.0, 4.0 ]
241-
]
242-
]
243-
];
244-
y = [
245-
[
246-
[
247-
[ 5.0, 6.0 ],
248-
[ 7.0, 8.0 ]
249-
],
250-
[
251-
[ 5.0, 6.0 ],
252-
[ 7.0, 8.0 ]
253-
]
254-
]
255-
];
256-
z = zeros4d( shape );
257-
258-
expected = zeros4d( shape );
259-
binary4d( [ x, y, z ], [ 2, 2, 2, 0 ], clbk );
260-
261-
t.deepEqual( z, expected, 'returns expected value' );
262-
t.end();
263-
264-
function clbk() {
265-
t.ok( false, 'should not invoke callback' );
266-
}
267-
});

0 commit comments

Comments
 (0)