Skip to content

Commit 3db0802

Browse files
fix: fixed test files
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed ---
1 parent 6d3d7df commit 3db0802

File tree

4 files changed

+13
-41
lines changed

4 files changed

+13
-41
lines changed

lib/node_modules/@stdlib/stats/base/dmeanpn/test/test.dmeanpn.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var floor = require( '@stdlib/math/base/special/floor' );
2524
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2625
var Float64Array = require( '@stdlib/array/float64' );
2726
var dmeanpn = require( './../lib/dmeanpn.js' );
@@ -87,7 +86,6 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
8786
});
8887

8988
tape( 'the function supports a `stride` parameter', function test( t ) {
90-
var N;
9189
var x;
9290
var v;
9391

@@ -102,15 +100,13 @@ tape( 'the function supports a `stride` parameter', function test( t ) {
102100
2.0
103101
]);
104102

105-
N = floor( x.length / 2 );
106-
v = dmeanpn( N, x, 2 );
103+
v = dmeanpn( 4, x, 2 );
107104

108105
t.strictEqual( v, 1.25, 'returns expected value' );
109106
t.end();
110107
});
111108

112109
tape( 'the function supports a negative `stride` parameter', function test( t ) {
113-
var N;
114110
var x;
115111
var v;
116112

@@ -125,8 +121,7 @@ tape( 'the function supports a negative `stride` parameter', function test( t )
125121
2.0
126122
]);
127123

128-
N = floor( x.length / 2 );
129-
v = dmeanpn( N, x, -2 );
124+
v = dmeanpn( 4, x, -2 );
130125

131126
t.strictEqual( v, 1.25, 'returns expected value' );
132127
t.end();
@@ -138,7 +133,7 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the f
138133

139134
x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
140135

141-
v = dmeanpn( x.length, x, 0 );
136+
v = dmeanpn( 5, x, 0 );
142137
t.strictEqual( v, 1.0, 'returns expected value' );
143138

144139
t.end();
@@ -147,7 +142,6 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the f
147142
tape( 'the function supports view offsets', function test( t ) {
148143
var x0;
149144
var x1;
150-
var N;
151145
var v;
152146

153147
x0 = new Float64Array([
@@ -163,9 +157,8 @@ tape( 'the function supports view offsets', function test( t ) {
163157
]);
164158

165159
x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
166-
N = floor(x1.length / 2);
167160

168-
v = dmeanpn( N, x1, 2 );
161+
v = dmeanpn( 4, x1, 2 );
169162
t.strictEqual( v, 1.25, 'returns expected value' );
170163

171164
t.end();

lib/node_modules/@stdlib/stats/base/dmeanpn/test/test.dmeanpn.native.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var floor = require( '@stdlib/math/base/special/floor' );
2625
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2726
var Float64Array = require( '@stdlib/array/float64' );
2827
var tryRequire = require( '@stdlib/utils/try-require' );
@@ -178,7 +177,6 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
178177
});
179178

180179
tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
181-
var N;
182180
var x;
183181
var v;
184182

@@ -193,15 +191,13 @@ tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
193191
2.0
194192
]);
195193

196-
N = floor( x.length / 2 );
197-
v = dmeanpn( N, x, 2 );
194+
v = dmeanpn( 4, x, 2 );
198195

199196
t.strictEqual( v, 1.25, 'returns expected value' );
200197
t.end();
201198
});
202199

203200
tape( 'the function supports a negative `strideX` parameter', opts, function test( t ) {
204-
var N;
205201
var x;
206202
var v;
207203

@@ -216,8 +212,7 @@ tape( 'the function supports a negative `strideX` parameter', opts, function tes
216212
2.0
217213
]);
218214

219-
N = floor( x.length / 2 );
220-
v = dmeanpn( N, x, -2 );
215+
v = dmeanpn( 4, x, -2 );
221216

222217
t.strictEqual( v, 1.25, 'returns expected value' );
223218
t.end();
@@ -238,7 +233,6 @@ tape( 'if provided a `strideX` parameter equal to `0`, the function returns the
238233
tape( 'the function supports view offsets', opts, function test( t ) {
239234
var x0;
240235
var x1;
241-
var N;
242236
var v;
243237

244238
x0 = new Float64Array([
@@ -254,9 +248,8 @@ tape( 'the function supports view offsets', opts, function test( t ) {
254248
]);
255249

256250
x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
257-
N = floor(x1.length / 2);
258251

259-
v = dmeanpn( N, x1, 2 );
252+
v = dmeanpn( 4, x1, 2 );
260253
t.strictEqual( v, 1.25, 'returns expected value' );
261254

262255
t.end();

lib/node_modules/@stdlib/stats/base/dmeanpn/test/test.ndarray.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var floor = require( '@stdlib/math/base/special/floor' );
2524
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2625
var Float64Array = require( '@stdlib/array/float64' );
2726
var dmeanpn = require( './../lib/ndarray.js' );
@@ -87,7 +86,6 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
8786
});
8887

8988
tape( 'the function supports a `strideX` parameter', function test( t ) {
90-
var N;
9189
var x;
9290
var v;
9391

@@ -102,15 +100,13 @@ tape( 'the function supports a `strideX` parameter', function test( t ) {
102100
2.0
103101
]);
104102

105-
N = floor( x.length / 2 );
106-
v = dmeanpn( N, x, 2, 0 );
103+
v = dmeanpn( 4, x, 2, 0 );
107104

108105
t.strictEqual( v, 1.25, 'returns expected value' );
109106
t.end();
110107
});
111108

112109
tape( 'the function supports a negative `strideX` parameter', function test( t ) {
113-
var N;
114110
var x;
115111
var v;
116112

@@ -125,8 +121,7 @@ tape( 'the function supports a negative `strideX` parameter', function test( t )
125121
2.0
126122
]);
127123

128-
N = floor( x.length / 2 );
129-
v = dmeanpn( N, x, -2, 6 );
124+
v = dmeanpn( 4, x, -2, 6 );
130125

131126
t.strictEqual( v, 1.25, 'returns expected value' );
132127
t.end();
@@ -145,7 +140,6 @@ tape( 'if provided a `strideX` parameter equal to `0`, the function returns the
145140
});
146141

147142
tape( 'the function supports an `offsetX` parameter', function test( t ) {
148-
var N;
149143
var x;
150144
var v;
151145

@@ -159,9 +153,8 @@ tape( 'the function supports an `offsetX` parameter', function test( t ) {
159153
3.0,
160154
4.0 // 3
161155
]);
162-
N = floor( x.length / 2 );
163156

164-
v = dmeanpn( N, x, 2, 1 );
157+
v = dmeanpn( 4, x, 2, 1 );
165158
t.strictEqual( v, 1.25, 'returns expected value' );
166159

167160
t.end();

lib/node_modules/@stdlib/stats/base/dmeanpn/test/test.ndarray.native.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var floor = require( '@stdlib/math/base/special/floor' );
2625
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2726
var Float64Array = require( '@stdlib/array/float64' );
2827
var tryRequire = require( '@stdlib/utils/try-require' );
@@ -96,7 +95,6 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
9695
});
9796

9897
tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
99-
var N;
10098
var x;
10199
var v;
102100

@@ -111,15 +109,13 @@ tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
111109
2.0
112110
]);
113111

114-
N = floor( x.length / 2 );
115-
v = dmeanpn( N, x, 2, 0 );
112+
v = dmeanpn( 4, x, 2, 0 );
116113

117114
t.strictEqual( v, 1.25, 'returns expected value' );
118115
t.end();
119116
});
120117

121118
tape( 'the function supports a negative `strideX` parameter', opts, function test( t ) {
122-
var N;
123119
var x;
124120
var v;
125121

@@ -134,8 +130,7 @@ tape( 'the function supports a negative `strideX` parameter', opts, function tes
134130
2.0
135131
]);
136132

137-
N = floor( x.length / 2 );
138-
v = dmeanpn( N, x, -2, 6 );
133+
v = dmeanpn( 4, x, -2, 6 );
139134

140135
t.strictEqual( v, 1.25, 'returns expected value' );
141136
t.end();
@@ -154,7 +149,6 @@ tape( 'if provided a `strideX` parameter equal to `0`, the function returns the
154149
});
155150

156151
tape( 'the function supports an `offsetX` parameter', opts, function test( t ) {
157-
var N;
158152
var x;
159153
var v;
160154

@@ -168,9 +162,8 @@ tape( 'the function supports an `offsetX` parameter', opts, function test( t ) {
168162
3.0,
169163
4.0 // 3
170164
]);
171-
N = floor( x.length / 2 );
172165

173-
v = dmeanpn( N, x, 2, 1 );
166+
v = dmeanpn( 4, x, 2, 1 );
174167
t.strictEqual( v, 1.25, 'returns expected value' );
175168

176169
t.end();

0 commit comments

Comments
 (0)