Skip to content

chore: fix JavaScript lint errors (issue #7070 ) #7739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,58 +47,58 @@
* // returns 6.25
*/
function dnanvarianceyc( N, correction, x, strideX, offsetX ) {
var sum;
var ix;
var nc;
var S;
var v;
var d;
var n;
var i;
var sum;

Check failure on line 50 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var ix;

Check failure on line 51 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var nc;

Check failure on line 52 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var S;

Check failure on line 53 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var v;

Check failure on line 54 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var d;

Check failure on line 55 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var n;

Check failure on line 56 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
var i;

Check failure on line 57 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces

if ( N <= 0 ) {
return NaN;
}
if ( N === 1 || strideX === 0 ) {
v = x[ offsetX ];
if ( v === v && N-correction > 0.0 ) {
return 0.0;
}
return NaN;
}
ix = offsetX;
if ( N <= 0 ) {

Check failure on line 59 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 1 tab but found 4 spaces
return NaN;

Check failure on line 60 in lib/node_modules/@stdlib/stats/strided/dnanvarianceyc/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Expected indentation of 2 tabs but found 8 spaces
}
if ( N === 1 || strideX === 0 ) {
v = x[ offsetX ];
if ( v === v && N-correction > 0.0 ) {
return 0.0;
}
return NaN;
}
ix = offsetX;

// Find the first non-NaN element...
for ( i = 0; i < N; i++ ) {
v = x[ ix ];
if ( v === v ) {
break;
}
ix += strideX;
}
if ( i === N ) {
return NaN;
}
ix += strideX;
sum = v;
S = 0.0;
i += 1;
n = 1;
for ( i; i < N; i++ ) {
v = x[ ix ];
if ( v === v ) {
n += 1;
sum += v;
d = (n*v) - sum;
S += (1.0/(n*(n-1))) * d * d;
}
ix += strideX;
}
nc = n - correction;
if ( nc <= 0.0 ) {
return NaN;
}
return S / nc;
// Find the first non-NaN element...
for ( i = 0; i < N; i++ ) {
v = x[ ix ];
if ( v === v ) {
break;
}
ix += strideX;
}
if ( i === N ) {
return NaN;
}
ix += strideX;
sum = v;
S = 0.0;
i += 1;
n = 1;
for ( i; i < N; i++ ) {
v = x[ ix ];
if ( v === v ) {
n += 1;
sum += v;
d = (n*v) - sum;
S += (1.0/(n*(n-1))) * d * d;
}
ix += strideX;
}
nc = n - correction;
if ( nc <= 0.0 ) {
return NaN;
}
return S / nc;
}


Expand Down
Loading