Skip to content

Commit e56049b

Browse files
committed
Auto-generated commit
1 parent 39f3cc6 commit e56049b

File tree

8 files changed

+40
-68
lines changed

8 files changed

+40
-68
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This release closes the following issue:
3434

3535
<details>
3636

37+
- [`0ce3935`](https://github.com/stdlib-js/stdlib/commit/0ce393575bc9f92b32158f83cc47c02aec2445e8) - **refactor:** rename files and update paths _(by Athan Reines)_
3738
- [`719cc56`](https://github.com/stdlib-js/stdlib/commit/719cc56a839fc0e790c51a21621c8d71d27af5f8) - **feat:** add support for accessor arrays and refactor `stats/base/nanstdevwd` [(#7590)](https://github.com/stdlib-js/stdlib/pull/7590) _(by Gururaj Gurram)_
3839
- [`e6caafc`](https://github.com/stdlib-js/stdlib/commit/e6caafc261076eba2325f589f094c8264ba6d8b2) - **refactor:** update paths _(by Aayush Khanna)_
3940

@@ -47,9 +48,10 @@ This release closes the following issue:
4748

4849
### Contributors
4950

50-
A total of 2 people contributed to this release. Thank you to the following contributors:
51+
A total of 3 people contributed to this release. Thank you to the following contributors:
5152

5253
- Aayush Khanna
54+
- Athan Reines
5355
- Gururaj Gurram
5456

5557
</section>

benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var filledarrayBy = require( '@stdlib/array-filled-by' );
2727
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2828
var pow = require( '@stdlib/math-base-special-pow' );
2929
var pkg = require( './../package.json' ).name;
30-
var nanstdevwd = require( './../lib/main.js' );
30+
var nanstdevwd = require( './../lib' );
3131

3232

3333
// FUNCTIONS //

dist/index.js

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@
4242

4343
// MODULES //
4444

45+
var setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );
4546
var main = require( './main.js' );
47+
var ndarray = require( './ndarray.js' );
48+
49+
50+
// MAIN //
51+
52+
setReadOnly( main, 'ndarray', ndarray );
4653

4754

4855
// EXPORTS //

lib/main.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,30 @@
2020

2121
// MODULES //
2222

23-
var setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );
24-
var nanstdevwd = require( './nanstdevwd.js' );
23+
var stride2offset = require( '@stdlib/strided-base-stride2offset' );
2524
var ndarray = require( './ndarray.js' );
2625

2726

2827
// MAIN //
2928

30-
setReadOnly( nanstdevwd, 'ndarray', ndarray );
29+
/**
30+
* Computes the standard deviation of a strided array ignoring `NaN` values and using Welford's algorithm.
31+
*
32+
* @param {PositiveInteger} N - number of indexed elements
33+
* @param {number} correction - degrees of freedom adjustment
34+
* @param {NumericArray} x - input array
35+
* @param {integer} strideX - stride length
36+
* @returns {number} standard deviation
37+
*
38+
* @example
39+
* var x = [ 1.0, -2.0, NaN, 2.0 ];
40+
*
41+
* var v = nanstdevwd( x.length, 1, x, 1 );
42+
* // returns ~2.0817
43+
*/
44+
function nanstdevwd( N, correction, x, strideX ) {
45+
return ndarray( N, correction, x, strideX, stride2offset( N, strideX ) );
46+
}
3147

3248

3349
// EXPORTS //

lib/nanstdevwd.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

test/test.nanstdevwd.js renamed to test/test.main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var sqrt = require( '@stdlib/math-base-special-sqrt' );
2525
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2626
var Float64Array = require( '@stdlib/array-float64' );
2727
var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );
28-
var nanstdevwd = require( './../lib/nanstdevwd.js' );
28+
var nanstdevwd = require( './../lib' );
2929

3030

3131
// TESTS //

0 commit comments

Comments
 (0)