Skip to content

Commit 66ed108

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

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/stats/strided/nancount/lib

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ function nancount( N, x, strideX, offsetX ) {
5555
// Cache a reference to the element accessor:
5656
get = x.accessors[ 0 ];
5757

58+
if ( strideX === 0 ) {
59+
v = get( xbuf, ix );
60+
return ( v === v ) ? N : 0;
61+
}
5862
ix = offsetX;
5963
n = 0;
6064
for ( i = 0; i < N; i++ ) {

0 commit comments

Comments
 (0)