Skip to content

Commit eb5b2e9

Browse files
committed
Auto-generated commit
1 parent 55f7bca commit eb5b2e9

File tree

13 files changed

+33
-26
lines changed

13 files changed

+33
-26
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ indent_style = tab
8686
[*.{f,f.txt}]
8787
indent_style = space
8888
indent_size = 2
89-
insert_final_newline = false
9089

9190
# Set properties for shell files:
9291
[*.{sh,sh.txt}]

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-01-08)
7+
## Unreleased (2025-02-05)
88

99
<section class="features">
1010

@@ -32,6 +32,8 @@
3232

3333
<details>
3434

35+
- [`93c884d`](https://github.com/stdlib-js/stdlib/commit/93c884d677c3c79c24a451a0f1badf45d8b6ee16) - **bench:** update `NaN` generation in `stats/base/*` [(#5044)](https://github.com/stdlib-js/stdlib/pull/5044) _(by Aayush Khanna)_
36+
- [`74c5fe1`](https://github.com/stdlib-js/stdlib/commit/74c5fe174a5fb4cd5fdd54abf6697d5e94c1ff87) - **docs:** update examples of `stats/base/dnanmeanwd` to show proper handling of `NaN` elements [(#4994)](https://github.com/stdlib-js/stdlib/pull/4994) _(by Aayush Khanna)_
3537
- [`7e63aad`](https://github.com/stdlib-js/stdlib/commit/7e63aad8c0b42330b0933973bddea8d1c5e84862) - **fix:** wrap function calls in `API_SUFFIX` in native addons [(#4646)](https://github.com/stdlib-js/stdlib/pull/4646) _(by Aayush Khanna)_
3638
- [`b046648`](https://github.com/stdlib-js/stdlib/commit/b046648de50ab6f4d3af98645313df1a067cd5ff) - **chore:** remove unused header in `stats/base/dnanmeanwd` [(#4497)](https://github.com/stdlib-js/stdlib/pull/4497) _(by Aayush Khanna)_
3739
- [`29f0cf3`](https://github.com/stdlib-js/stdlib/commit/29f0cf37d8c59629455eead33c36630c2f323750) - **test:** fix arguments _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
2727
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2828
Debashis Maharana <debashismaharana7854@gmail.com>
2929
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
30+
Dev Goel <135586571+corsairier@users.noreply.github.com>
3031
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
3132
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
3233
Dominic Lim <46486515+domlimm@users.noreply.github.com>
@@ -50,6 +51,7 @@ Joey Reed <joeyrreed@gmail.com>
5051
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
5152
Joris Labie <joris.labie1@gmail.com>
5253
Justin Dennison <justin1dennison@gmail.com>
54+
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
5355
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
5456
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
5557
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,28 @@ The function has the following parameters:
105105

106106
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the [arithmetic mean][arithmetic-mean] of every other element in `x`,
107107

108+
<!-- eslint-disable max-len -->
109+
108110
```javascript
109111
var Float64Array = require( '@stdlib/array-float64' );
110112

111-
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN ] );
113+
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN ] );
112114

113-
var v = dnanmeanwd( 4, x, 2 );
115+
var v = dnanmeanwd( 5, x, 2 );
114116
// returns 1.25
115117
```
116118

117119
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
118120

119-
<!-- eslint-disable stdlib/capitalized-comments -->
121+
<!-- eslint-disable stdlib/capitalized-comments, max-len -->
120122

121123
```javascript
122124
var Float64Array = require( '@stdlib/array-float64' );
123125

124-
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN ] );
126+
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
125127
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
126128

127-
var v = dnanmeanwd( 4, x1, 2 );
129+
var v = dnanmeanwd( 5, x1, 2 );
128130
// returns 1.25
129131
```
130132

@@ -147,12 +149,14 @@ The function has the following additional parameters:
147149

148150
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the [arithmetic mean][arithmetic-mean] for every other element in `x` starting from the second element
149151

152+
<!-- eslint-disable max-len -->
153+
150154
```javascript
151155
var Float64Array = require( '@stdlib/array-float64' );
152156

153-
var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN ] );
157+
var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
154158

155-
var v = dnanmeanwd.ndarray( 4, x, 2, 1 );
159+
var v = dnanmeanwd.ndarray( 5, x, 2, 1 );
156160
// returns 1.25
157161
```
158162

benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var dnanmeanwd = require( './../lib/dnanmeanwd.js' );
3939
* @returns {number} random number or `NaN`
4040
*/
4141
function rand() {
42-
if ( bernoulli( 0.2 ) ) {
42+
if ( bernoulli( 0.8 ) < 1 ) {
4343
return NaN;
4444
}
4545
return uniform( -10.0, 10.0 );

benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var opts = {
4848
* @returns {number} random number or `NaN`
4949
*/
5050
function rand() {
51-
if ( bernoulli( 0.2 ) ) {
51+
if ( bernoulli( 0.8 ) < 1 ) {
5252
return NaN;
5353
}
5454
return uniform( -10.0, 10.0 );

benchmark/benchmark.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var dnanmeanwd = require( './../lib/ndarray.js' );
3939
* @returns {number} random number or `NaN`
4040
*/
4141
function rand() {
42-
if ( bernoulli( 0.2 ) ) {
42+
if ( bernoulli( 0.8 ) < 1 ) {
4343
return NaN;
4444
}
4545
return uniform( -10.0, 10.0 );

benchmark/benchmark.ndarray.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var opts = {
4848
* @returns {number} random number or `NaN`
4949
*/
5050
function rand() {
51-
if ( bernoulli( 0.2 ) ) {
51+
if ( bernoulli( 0.8 ) < 1 ) {
5252
return NaN;
5353
}
5454
return uniform( -10.0, 10.0 );

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/repl.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
~0.3333
3838

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

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

5050

@@ -84,8 +84,8 @@
8484
~0.3333
8585

8686
// Using offset parameter:
87-
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN ] );
88-
> {{alias}}.ndarray( 3, x, 2, 1 )
87+
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN, NaN ] );
88+
> {{alias}}.ndarray( 4, x, 2, 1 )
8989
~-0.3333
9090

9191
See Also

0 commit comments

Comments
 (0)