Skip to content

Commit 5d54afb

Browse files
fix: CI errors
1 parent d93d46f commit 5d54afb

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

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

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ static double benchmark1( int iterations, int len ) {
130130
*/
131131
static double benchmark2( int iterations, int len ) {
132132
double elapsed;
133-
double x[ len ];
133+
float x[ len ];
134134
double v;
135135
double t;
136136
int i;
137137

138138
for ( i = 0; i < len; i++ ) {
139-
if ( rand_double() < 0.2 ) {
140-
x[ i ] = 0.0 / 0.0; // NaN
139+
if ( rand_float() < 0.2f ) {
140+
x[ i ] = 0.0f / 0.0f; // NaN
141141
} else {
142-
x[ i ] = ( rand_double() * 20000.0 ) - 10000.0;
142+
x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f;
143143
}
144144
}
145145
v = 0.0;

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

Lines changed: 5 additions & 5 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-
~1.25
36+
~0.333
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}}( 3, x, 2 )
41-
~1.25
41+
~0.333
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}}( 3, x1, 2 )
47-
~-1.25
47+
~-0.333
4848

4949
{{alias}}.ndarray( N, x, strideX, offsetX )
5050
Computes the arithmetic mean of a single-precision floating-point strided
@@ -79,12 +79,12 @@
7979
// Standard Usage:
8080
> var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 2.0 ] );
8181
> {{alias}}.ndarray( x.length, x, 1, 0 )
82-
~1.25
82+
~0.333
8383

8484
// Using offset parameter:
8585
> var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );
8686
> {{alias}}.ndarray( 3, x, 2, 1 )
87-
~-1.25
87+
~-0.333
8888

8989
See Also
9090
--------

lib/node_modules/@stdlib/stats/base/dsmean/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
int main( void ) {
2323
// Create a strided array:
24-
float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
24+
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
2525

2626
// Specify the number of elements:
2727
const int N = 4;
2828

2929
// Specify the stride length:
30-
const int stride = 2;
30+
const int strideX = 2;
3131

3232
// Compute the arithmetic mean:
3333
double v = stdlib_strided_dsmean( N, x, strideX );

lib/node_modules/@stdlib/stats/base/dsmean/include/stdlib/stats/base/dsmean.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ extern "C" {
3131
/**
3232
* Computes the arithmetic mean of a single-precision floating-point strided array using extended accumulation and returning an extended precision result.
3333
*/
34-
double API_SUFFIX(stdlib_strided_dsmean)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
34+
double API_SUFFIX(stdlib_strided_dsmean)( const CBLAS_INT N, const float *X, const CBLAS_INT strideX );
3535

3636
/**
3737
* Computes the mean absolute value of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics .
3838
*/
39-
double API_SUFFIX(stdlib_strided_dsmean_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
39+
double API_SUFFIX(stdlib_strided_dsmean_ndarray)( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
4040

4141
#ifdef __cplusplus
4242
}

lib/node_modules/@stdlib/stats/base/dsmean/lib/dsmean.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var addon = require( './../src/addon.node' );
3838
*
3939
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
4040
*
41-
* var v = dsmean( s.length, x, 1 );
41+
* var v = dsmean( x.length, x, 1 );
4242
* // returns ~0.3333
4343
*/
4444
function dsmean( N, x, strideX ) {

lib/node_modules/@stdlib/stats/base/dsmean/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@stdlib/napi/export",
4747
"@stdlib/napi/argv",
4848
"@stdlib/napi/argv-int64",
49-
"@stdlib/napi/argv-strided-float64array",
49+
"@stdlib/napi/argv-strided-float32array",
5050
"@stdlib/napi/create-double"
5151
]
5252
},

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

Lines changed: 4 additions & 4 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.
@@ -20,7 +20,7 @@
2020
#include "stdlib/napi/export.h"
2121
#include "stdlib/napi/argv.h"
2222
#include "stdlib/napi/argv_int64.h"
23-
#include "stdlib/napi/argv_strided_float64array.h"
23+
#include "stdlib/napi/argv_strided_float32array.h"
2424
#include "stdlib/napi/create_double.h"
2525
#include <node_api.h>
2626

@@ -35,7 +35,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
3535
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
3636
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
3737
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
38-
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
38+
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
3939
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dsmean( N, X, strideX ), v );
4040
return v;
4141
}
@@ -52,7 +52,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
5252
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
5353
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
5454
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
55-
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
55+
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
5656
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dsmean_ndarray( N, X, strideX, offsetX ), v );
5757
return v;
5858
}

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

Lines changed: 3 additions & 3 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.
@@ -29,7 +29,7 @@
2929
* @param stride stride length
3030
* @return output value
3131
*/
32-
double API_SUFFIX(stdlib_strided_dsmean)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX ) {
32+
double API_SUFFIX(stdlib_strided_dsmean)( const CBLAS_INT N, const float *X, const CBLAS_INT strideX ) {
3333
const CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
3434
return API_SUFFIX(stdlib_strided_dsmean_ndarray)( N, X, strideX, ox );
3535
}
@@ -43,6 +43,6 @@ double API_SUFFIX(stdlib_strided_dsmean)( const CBLAS_INT N, const double *X, co
4343
* @param offsetX starting index for X
4444
* @return output value
4545
*/
46-
double API_SUFFIX(stdlib_strided_dsmean_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
46+
double API_SUFFIX(stdlib_strided_dsmean_ndarray)( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
4747
return stdlib_strided_dsmeanpn( N, X, strideX );
4848
}

0 commit comments

Comments
 (0)