Skip to content

Commit d57726d

Browse files
chore: minor clean up
1 parent d27dd9a commit d57726d

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,12 @@ var v = dsmeanwd.ndarray( 4, x, 2, 1 );
145145
<!-- eslint no-undef: "error" -->
146146

147147
```javascript
148-
var randu = require( '@stdlib/random/base/randu' );
149-
var round = require( '@stdlib/math/base/special/round' );
150-
var Float32Array = require( '@stdlib/array/float32' );
148+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
151149
var dsmeanwd = require( '@stdlib/stats/base/dsmeanwd' );
152150

153-
var x;
154-
var i;
155-
156-
x = new Float32Array( 10 );
157-
for ( i = 0; i < x.length; i++ ) {
158-
x[ i ] = round( (randu()*100.0) - 50.0 );
159-
}
151+
var x = discreteUniform( 10, -50, 50, {
152+
'dtype': 'float32'
153+
});
160154
console.log( x );
161155

162156
var v = dsmeanwd( x.length, x, 1 );

lib/node_modules/@stdlib/stats/base/dsmeanwd/src/addon.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) 2024 The Stdlib Authors.
4+
* Copyright (c) 2025 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.

lib/node_modules/@stdlib/stats/base/dsmeanwd/src/main.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) 2024 The Stdlib Authors.
4+
* Copyright (c) 2025 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.
@@ -71,7 +71,7 @@ double API_SUFFIX(stdlib_strided_dsmeanwd_ndarray)( const CBLAS_INT N, const flo
7171
return 0.0 / 0.0; // NaN
7272
}
7373
if ( N == 1 || strideX == 0 ) {
74-
return X[ 0 ];
74+
return X[ offsetX ];
7575
}
7676
ix = offsetX;
7777
mu = 0.0;

0 commit comments

Comments
 (0)