Skip to content

Commit 1bfe09a

Browse files
fix: tests of stats/base/dmeanpn
--- 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: passed - 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 b0b0a0c commit 1bfe09a

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var dapxsumpw = require( '@stdlib/blas/ext/base/dapxsumpw' ).ndarray;
4141
* @param {PositiveInteger} N - number of indexed elements
4242
* @param {Float64Array} x - input array
4343
* @param {integer} strideX - strideX length
44-
* @param {NonNegativeInteger} offset - starting index
44+
* @param {NonNegativeInteger} offsetX - starting index
4545
* @returns {number} arithmetic mean
4646
*
4747
* @example
@@ -53,21 +53,21 @@ var dapxsumpw = require( '@stdlib/blas/ext/base/dapxsumpw' ).ndarray;
5353
* var v = dmeanpn( 4, x, 2, 1 );
5454
* // returns 1.25
5555
*/
56-
function dmeanpn( N, x, strideX, offset ) {
56+
function dmeanpn( N, x, strideX, offsetX ) {
5757
var mu;
5858
var c;
5959

6060
if ( N <= 0 ) {
6161
return NaN;
6262
}
6363
if ( N === 1 || strideX === 0 ) {
64-
return x[ offset ];
64+
return x[ offsetX ];
6565
}
6666
// Compute an estimate for the mean:
67-
mu = dsumpw( N, x, strideX, offset ) / N;
67+
mu = dsumpw( N, x, strideX, offsetX ) / N;
6868

6969
// Compute an error term:
70-
c = dapxsumpw( N, -mu, x, strideX, offset ) / N;
70+
c = dapxsumpw( N, -mu, x, strideX, offsetX ) / N;
7171

7272
return mu + c;
7373
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the f
133133

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

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

139139
t.end();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
176176
t.end();
177177
});
178178

179-
tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
179+
tape( 'the function supports a `stride` parameter', opts, function test( t ) {
180180
var x;
181181
var v;
182182

@@ -197,7 +197,7 @@ tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
197197
t.end();
198198
});
199199

200-
tape( 'the function supports a negative `strideX` parameter', opts, function test( t ) {
200+
tape( 'the function supports a negative `stride` parameter', opts, function test( t ) {
201201
var x;
202202
var v;
203203

@@ -218,7 +218,7 @@ tape( 'the function supports a negative `strideX` parameter', opts, function tes
218218
t.end();
219219
});
220220

221-
tape( 'if provided a `strideX` parameter equal to `0`, the function returns the first element', opts, function test( t ) {
221+
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first element', opts, function test( t ) {
222222
var x;
223223
var v;
224224

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
8585
t.end();
8686
});
8787

88-
tape( 'the function supports a `strideX` parameter', function test( t ) {
88+
tape( 'the function supports a `stride` parameter', function test( t ) {
8989
var x;
9090
var v;
9191

@@ -106,7 +106,7 @@ tape( 'the function supports a `strideX` parameter', function test( t ) {
106106
t.end();
107107
});
108108

109-
tape( 'the function supports a negative `strideX` parameter', function test( t ) {
109+
tape( 'the function supports a negative `stride` parameter', function test( t ) {
110110
var x;
111111
var v;
112112

@@ -127,7 +127,7 @@ tape( 'the function supports a negative `strideX` parameter', function test( t )
127127
t.end();
128128
});
129129

130-
tape( 'if provided a `strideX` parameter equal to `0`, the function returns the first indexed element', function test( t ) {
130+
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first indexed element', function test( t ) {
131131
var x;
132132
var v;
133133

@@ -139,7 +139,7 @@ tape( 'if provided a `strideX` parameter equal to `0`, the function returns the
139139
t.end();
140140
});
141141

142-
tape( 'the function supports an `offsetX` parameter', function test( t ) {
142+
tape( 'the function supports an `offset` parameter', function test( t ) {
143143
var x;
144144
var v;
145145

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ tape( 'if provided an `N` parameter equal to `1`, the function returns the first
9494
t.end();
9595
});
9696

97-
tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
97+
tape( 'the function supports a `stride` parameter', opts, function test( t ) {
9898
var x;
9999
var v;
100100

@@ -115,7 +115,7 @@ tape( 'the function supports a `strideX` parameter', opts, function test( t ) {
115115
t.end();
116116
});
117117

118-
tape( 'the function supports a negative `strideX` parameter', opts, function test( t ) {
118+
tape( 'the function supports a negative `stride` parameter', opts, function test( t ) {
119119
var x;
120120
var v;
121121

@@ -136,7 +136,7 @@ tape( 'the function supports a negative `strideX` parameter', opts, function tes
136136
t.end();
137137
});
138138

139-
tape( 'if provided a `strideX` parameter equal to `0`, the function returns the first indexed element', opts, function test( t ) {
139+
tape( 'if provided a `stride` parameter equal to `0`, the function returns the first indexed element', opts, function test( t ) {
140140
var x;
141141
var v;
142142

@@ -148,7 +148,7 @@ tape( 'if provided a `strideX` parameter equal to `0`, the function returns the
148148
t.end();
149149
});
150150

151-
tape( 'the function supports an `offsetX` parameter', opts, function test( t ) {
151+
tape( 'the function supports an `offset` parameter', opts, function test( t ) {
152152
var x;
153153
var v;
154154

0 commit comments

Comments
 (0)