Skip to content

Commit ea0278e

Browse files
committed
Auto-generated commit
1 parent d2e2abc commit ea0278e

File tree

5 files changed

+18
-242
lines changed

5 files changed

+18
-242
lines changed

.github/.keepalive

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-11-01T04:35:18.467Z

.github/workflows/publish.yml

+10-2
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

+1
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+
Robert Gislason <gztown2216@yahoo.com>

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"@stdlib/array-base-zeros4d": "^0.1.0",
4545
"@stdlib/bench": "^0.1.0",
4646
"@stdlib/math-base-assert-is-nan": "^0.1.1",
47-
"@stdlib/math-base-special-abs": "^0.1.0",
48-
"@stdlib/math-base-special-floor": "^0.1.0",
49-
"@stdlib/math-base-special-identity": "^0.1.0",
47+
"@stdlib/math-base-special-abs": "^0.1.1",
48+
"@stdlib/math-base-special-floor": "^0.1.1",
49+
"@stdlib/math-base-special-identity": "^0.1.1",
5050
"@stdlib/math-base-special-pow": "^0.1.0",
5151
"@stdlib/ndarray-base-numel": "^0.1.1",
5252
"@stdlib/random-base-discrete-uniform": "^0.1.0",

test/dist/test.js

+3-237
Original file line numberDiff line numberDiff line change
@@ -21,247 +21,13 @@
2121
// MODULES //
2222

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