Skip to content

Commit 4d905ec

Browse files
fix: lint error
1 parent 27e23e1 commit 4d905ec

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

lib/node_modules/@stdlib/stats/base/dnanmeanwd/README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ var floor = require( '@stdlib/math/base/special/floor' );
9292

9393
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN ] );
9494
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
95-
96-
var v = dnanmeanwd( 5, x1, 2 );
97-
// returns 1.25
9895
```
9996

10097
#### dnanmeanwd.ndarray( N, x, strideX, offsetX )
@@ -120,9 +117,6 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
120117
var Float64Array = require( '@stdlib/array/float64' );
121118

122119
var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN ] );
123-
124-
var v = dnanmeanwd.ndarray( 5, x, 2, 1 );
125-
// returns 1.25
126120
```
127121

128122
</section>
@@ -211,6 +205,7 @@ double v = stdlib_strided_dnanmeanwd( 5, x, 1 );
211205
```
212206
213207
The function accepts the following arguments:
208+
214209
- **N**: `[in] CBLAS_INT` number of indexed elements.
215210
- **X**: `[in] double*` input array.
216211
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
@@ -231,6 +226,7 @@ double v = stdlib_strided_dnanmeanwd_ndarray( 5, x, 1, 0 );
231226
```
232227
233228
The function accepts the following arguments:
229+
234230
- **N**: `[in] CBLAS_INT` number of indexed elements.
235231
- **X**: `[in] double*` input array.
236232
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
@@ -264,19 +260,19 @@ double stdlib_strided_dnanmeanwd_ndarray( const CBLAS_INT N, const double *X, co
264260

265261
int main( void ) {
266262
// Create a strided array:
267-
const double x[] = { 1.0, 2.0, 0.0/0.0, 3.0, 0.0/0.0, 4.0, 5.0, 6.0, 0.0/0.0, 7.0, 8.0, 0.0/0.0 };
263+
const double x[] = { 1.0, 2.0, 0.0/0.0, 3.0, 0.0/0.0, 4.0, 5.0, 6.0, 0.0/0.0, 7.0, 8.0, 0.0/0.0 };
268264

269-
// Specify the number of elements:
270-
const int N = 6;
265+
// Specify the number of elements:
266+
const int N = 6;
271267

272-
// Specify the stride length:
273-
const int strideX = 2;
268+
// Specify the stride length:
269+
const int strideX = 2;
274270

275-
// Compute the arithmetic mean:
276-
double v = stdlib_strided_dnanmeanwd( N, x, strideX );
271+
// Compute the arithmetic mean:
272+
double v = stdlib_strided_dnanmeanwd( N, x, strideX );
277273

278-
// Print the result:
279-
printf( "mean: %lf\n", v );
274+
// Print the result:
275+
printf( "mean: %lf\n", v );
280276
}
281277
```
282278

lib/node_modules/@stdlib/stats/base/dnanmeanwd/benchmark/c/benchmark.length.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static double rand_double( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
static double benchmark( int iterations, int len ) {
97+
static double benchmark1( int iterations, int len ) {
9898
double elapsed;
9999
double x[ len ];
100100
double v;

lib/node_modules/@stdlib/stats/base/dnanmeanwd/docs/repl.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,17 @@
3838

3939
// Using `N` and stride parameters:
4040
> x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN ] );
41-
> {{alias}}( 3, x, stride )
41+
> {{alias}}( 3, x, strideX )
4242
~0.3333
4343

4444
// Using view offsets:
4545
> var x0 = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN ] );
4646
> var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
47-
> {{alias}}( 3, x1, stride )
47+
> {{alias}}( 3, x1, strideX )
4848
~-0.3333
4949

50-
{{alias}}.ndarray( N, x, stride, offset )
50+
51+
{{alias}}.ndarray( N, x, strideX, offsetX )
5152
Computes the arithmetic mean of a double-precision floating-point strided
5253
array, ignoring `NaN` values and using Welford's algorithm and alternative
5354
indexing semantics.
@@ -67,7 +68,7 @@
6768
strideX: integer
6869
Stride Length.
6970

70-
offset: integer
71+
offsetX: integer
7172
Starting index.
7273

7374
Returns

0 commit comments

Comments
 (0)