Skip to content

Commit bcf7bf1

Browse files
fix: CI errors
1 parent fe075bf commit bcf7bf1

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

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

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var Float32Array = require( '@stdlib/array/float32' );
7777

7878
var x = new Float32Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ] );
7979

80-
var v = dsmeanors( 5, x, 2 );
80+
var v = dsmeanors( 4, x, 2 );
8181
// returns 1.25
8282
```
8383

@@ -91,7 +91,7 @@ var Float32Array = require( '@stdlib/array/float32' );
9191
var x0 = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
9292
var x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
9393

94-
var v = dsmeanors( 5, x1, 2 );
94+
var v = dsmeanors( 4, x1, 2 );
9595
// returns 1.25
9696
```
9797

@@ -119,7 +119,7 @@ var Float32Array = require( '@stdlib/array/float32' );
119119

120120
var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
121121

122-
var v = dsmeanors.ndarray( 5, x, 2, 1 );
122+
var v = dsmeanors.ndarray( 4, x, 2, 1 );
123123
// returns 1.25
124124
```
125125

@@ -180,39 +180,44 @@ console.log( v );
180180

181181
#### stdlib_strided_dsmeanors( N, \*X, strideX )
182182

183-
Calculate the maximum value of a double-precision floating-point strided array, ignoring `NaN` values.
183+
Calculate the mean value of a single-precision floating-point strided array, ignoring `NaN` values.
184184

185185
```c
186186
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
187187

188-
flaot v = stdlib_strided_dsmeanors( 5, x, 2 );
189-
// returns 7.0
188+
float v = stdlib_strided_dsmeanors( 4, x, 2 );
189+
// returns 1.25
190190
```
191+
191192
The function accepts the following arguments:
193+
192194
- **N**: `[in] CBLAS_INT` number of indexed elements.
193-
- **X**: `[in] double*` input array.
195+
- **X**: `[in] float*` input array.
194196
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
197+
195198
```c
196-
double stdlib_strided_dnanmax( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
199+
float stdlib_strided_dsmeanors( const CBLAS_INT N, const float *X, const CBLAS_INT strideX );
197200
```
198201

199-
#### stdlib_strided_dnanmax_ndarray( N, \*X, strideX, offsetX )
202+
#### stdlib_strided_dsmeanors_ndarray( N, \*X, strideX, offsetX )
200203

201-
Computes the maximum value of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
204+
Computes the mean value of a single-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
202205

203206
```c
204-
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0/0.0, 0.0/0.0 };
207+
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
205208

206-
double v = stdlib_strided_dnanmax_ndarray( 5, x, 2, 0 );
207-
// returns 7.0
209+
float v = stdlib_strided_dsmeanors_ndarray( 4, x, 2, 0 );
210+
// returns 1.25
208211
```
209212
The function accepts the following arguments:
213+
210214
- **N**: `[in] CBLAS_INT` number of indexed elements.
211-
- **X**: `[in] double*` input array.
215+
- **X**: `[in] float*` input array.
212216
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
213217
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
218+
214219
```c
215-
double stdlib_strided_dnanmax_ndarray( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
220+
double stdlib_strided_dsmeanors_ndarray( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
216221
```
217222

218223
</section>
@@ -234,25 +239,25 @@ double stdlib_strided_dnanmax_ndarray( const CBLAS_INT N, const double *X, const
234239
### Examples
235240

236241
```c
237-
#include "stdlib/stats/base/dnanmax.h"
242+
#include "stdlib/stats/base/dsmeanors.h"
238243
#include <stdint.h>
239244
#include <stdio.h>
240245

241246
int main( void ) {
242247
// Create a strided array:
243-
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0/0.0, 0.0/0.0 };
248+
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
244249

245250
// Specify the number of elements:
246-
const int N = 5;
251+
const int N = 4;
247252

248253
// Specify the stride length:
249254
const int strideX = 2;
250255

251-
// Compute the maximum value:
252-
double v = stdlib_strided_dnanmax( N, x, strideX );
256+
// Compute the arithmetic mean:
257+
float v = stdlib_strided_dsmeanors( N, x, strideX );
253258

254259
// Print the result:
255-
printf( "max: %lf\n", v );
260+
printf( "mean: %lf\n", v );
256261
}
257262
```
258263

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
// Standard Usage:
3434
> var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 2.0 ] );
3535
> {{alias}}( x.length, x, 1 )
36-
~0.3333
36+
~NaN
3737

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

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

4949

5050
{{alias}}.ndarray( N, x, strideX, offsetX )
@@ -85,7 +85,7 @@
8585
// Using offset parameter:
8686
> var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );
8787
> {{alias}}.ndarray( 4, x, 2, 1 )
88-
~-0.3333
88+
~-1.25
8989

9090
See Also
9191
--------

lib/node_modules/@stdlib/stats/base/dsmeanors/src/addon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2020 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include "stdlib/stats/base/dsmean.h"
19+
#include "stdlib/stats/base/dsmeanors.h"
2020
#include "stdlib/napi/export.h"
2121
#include "stdlib/napi/argv.h"
2222
#include "stdlib/napi/argv_int64.h"

lib/node_modules/@stdlib/stats/base/dsmeanors/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2020 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)