Skip to content

Commit 5a9006b

Browse files
authored
Apply suggestions from code review
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
1 parent c69c645 commit 5a9006b

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

lib/node_modules/@stdlib/stats/strided/nancount/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The function has the following parameters:
5353
- **x**: input [`Array`][mdn-array] or [`typed array`][mdn-typed-array].
5454
- **strideX**: stride length for `x`.
5555

56-
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to calculate the count of every other element in `x`,
56+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to calculate the count for every other element in `x`,
5757

5858
```javascript
5959
var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN ];
@@ -78,7 +78,7 @@ var v = nancount( 4, x1, 2 );
7878

7979
#### nancount.ndarray( N, x, strideX, offsetX )
8080

81-
Calculate the number of non-`NaN` elements in a strided array
81+
Calculates the number of non-`NaN` elements in a strided array using alternative indexing semantics.
8282

8383
```javascript
8484
var x = [ 1.0, -2.0, NaN, 2.0 ];

lib/node_modules/@stdlib/stats/strided/nancount/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
Computes the number of non-`NaN` elements in a strided array.
5050

5151
While typed array views mandate a view offset based on the underlying
52-
buffer, the `offset` parameter supports indexing semantics based on a
53-
starting index.
52+
buffer, the offset parameter supports indexing semantics based on a starting
53+
index.
5454

5555
Parameters
5656
----------

lib/node_modules/@stdlib/stats/strided/nancount/lib/accessors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @param {Array<Function>} x.accessors - array element accessors
3131
* @param {integer} strideX - stride length
3232
* @param {NonNegativeInteger} offsetX - starting index
33-
* @returns {number} count
33+
* @returns {NonNegativeInteger} count
3434
*
3535
* @example
3636
* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
@@ -39,7 +39,7 @@
3939
* var x = toAccessorArray( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
4040
*
4141
* var v = nancount( 5, arraylike2object( x ), 2, 1 );
42-
* // returns 4.0
42+
* // returns 4
4343
*/
4444
function nancount( N, x, strideX, offsetX ) {
4545
var xbuf;

lib/node_modules/@stdlib/stats/strided/nancount/lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
* var x = [ 1.0, -2.0, NaN, 2.0 ];
3030
*
3131
* var v = nancount( x.length, x, 1 );
32-
* // returns 3.0
32+
* // returns 3
3333
*
3434
* @example
3535
* var nancount = require( '@stdlib/stats/strided/nancount' );
3636
*
3737
* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];
3838
*
3939
* var v = nancount.ndarray( 5, x, 2, 1 );
40-
* // returns 4.0
40+
* // returns 4
4141
*/
4242

4343
// MODULES //

lib/node_modules/@stdlib/stats/strided/nancount/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ var ndarray = require( './ndarray.js' );
3232
* @param {PositiveInteger} N - number of indexed elements
3333
* @param {NumericArray} x - input array
3434
* @param {integer} strideX - stride length
35-
* @returns {number} count
35+
* @returns {NonNegativeInteger} count
3636
*
3737
* @example
3838
* var x = [ 1.0, -2.0, NaN, 2.0 ];
3939
*
4040
* var v = nancount( x.length, x, 1 );
41-
* // returns 3.0
41+
* // returns 3
4242
*/
4343
function nancount( N, x, strideX ) {
4444
return ndarray( N, x, strideX, stride2offset( N, strideX ) );

lib/node_modules/@stdlib/stats/strided/nancount/lib/ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ var accessors = require( './accessors.js' );
3333
* @param {NumericArray} x - input array
3434
* @param {integer} strideX - stride length
3535
* @param {NonNegativeInteger} offsetX - starting index
36-
* @returns {number} count
36+
* @returns {NonNegativeInteger} count
3737
*
3838
* @example
3939
* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];
4040
*
4141
* var v = nancount( 5, x, 2, 1 );
42-
* // returns 4.0
42+
* // returns 4
4343
*/
4444
function nancount( N, x, strideX, offsetX ) {
4545
var ix;

0 commit comments

Comments
 (0)