Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions .github/workflows/scripts/run_affected_benchmarks/run
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ main() {

# Run JS benchmarks:
if [ -n "${js_bench_files}" ]; then
# Invoke make in batches to avoid "Argument list too long" errors:
printf '%s\n' ${js_bench_files} | xargs sh -c 'make benchmark-javascript-files FILES="$*"' _
# Invoke make in batches, capped well under the 128KiB Linux single-argument limit, in order to avoid "Argument list too long" errors:
printf '%s\n' ${js_bench_files} | xargs -s 40000 sh -c 'make benchmark-javascript-files FILES="$*"' _
else
echo 'No JavaScript benchmarks to run.' >&2
fi
Expand Down Expand Up @@ -173,8 +173,8 @@ main() {
fi

if [ -n "${c_bench_files}" ]; then
# Invoke make in batches to avoid "Argument list too long" errors:
printf '%s\n' ${c_bench_files} | xargs sh -c 'make benchmark-c-files FILES="$*"' _
# Invoke make in batches, capped well under the 128KiB Linux single-argument limit, in order to avoid "Argument list too long" errors:
printf '%s\n' ${c_bench_files} | xargs -s 40000 sh -c 'make benchmark-c-files FILES="$*"' _
else
echo 'No C benchmarks to run.' >&2
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ result = linter.verify( code, {
});
console.log( result );
/* =>
[
{
'ruleId': 'no-immediate-require',
'severity': 2,
'message': 'require() expressions should not be immediately invoked',
'line': 2,
'column': 15,
'nodeType': 'CallExpression',
'source': 'var pdf = require( \'@stdlib/stats/base/dists/normal/pdf\' ).factory( 0.0, 1.0 );',
'endLine': 2,
'endColumn': 29
}
]
[
{
'ruleId': 'no-immediate-require',
'severity': 2,
'message': 'require() expressions should not be immediately invoked',
'line': 2,
'column': 15,
'nodeType': 'CallExpression',
'source': 'var pdf = require( \'@stdlib/stats/base/dists/normal/pdf\' ).factory( 0.0, 1.0 );',
'endLine': 2,
'endColumn': 29
}
]
*/
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
function shuffle( data, sorted ) {
var out;
var i;
out = new Array( data.length );
out = [];
for ( i = 0; i < data.length; i++ ) {
out[ i ] = data[ sorted[i][0] ];
out.push( data[ sorted[i][0] ] );
}
return out;
}
Expand Down
18 changes: 9 additions & 9 deletions lib/node_modules/@stdlib/blas/base/drotg/test/test.assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ tape( 'the function computes a Givens plane rotation', function test( t ) {
];

for ( i = 0; i < values.length; i++ ) {
e = new Float64Array( expected[i] );
e = new Float64Array( expected[ i ] );
out = new Float64Array( 4 );
drotg( values[i][0], values[i][1], out, 1, 0 );
for ( j = 0; j < out.length; j++ ) {
t.strictEqual( isAlmostSameValue( out[j], e[j], 2 ), true, 'returns expected value' );
t.strictEqual( isAlmostSameValue( out[ j ], e[ j ], 2 ), true, 'returns expected value' );
}
}
t.end();
Expand All @@ -86,17 +86,17 @@ tape( 'the function returns an array of NaNs if provided a rotation elimination

actual = drotg( NaN, 1.0, new Float64Array( 4 ), 1, 0 );
for ( i = 0; i < actual.length; i++ ) {
t.strictEqual( isnan( actual[i] ), true, 'returns expected value' );
t.strictEqual( isnan( actual[ i ] ), true, 'returns expected value' );
}

actual = drotg( 1.0, NaN, new Float64Array( 4 ), 1, 0 );
for ( i = 0; i < actual.length; i++ ) {
t.strictEqual( isnan( actual[i] ), true, 'returns expected value' );
t.strictEqual( isnan( actual[ i ] ), true, 'returns expected value' );
}

actual = drotg( NaN, NaN, new Float64Array( 4 ), 1, 0 );
for ( i = 0; i < actual.length; i++ ) {
t.strictEqual( isnan( actual[i] ), true, 'returns expected value' );
t.strictEqual( isnan( actual[ i ] ), true, 'returns expected value' );
}
t.end();
});
Expand All @@ -113,7 +113,7 @@ tape( 'the function supports providing a positive stride', function test( t ) {
actual = drotg( 0.3, 0.4, out, 2, 0 );
t.strictEqual( actual, out, 'returns expected value' );
for ( i = 0; i < out.length; i++ ) {
t.strictEqual( isAlmostSameValue( out[i], expected[i], 2 ), true, 'returns expected value' );
t.strictEqual( isAlmostSameValue( out[ i ], expected[ i ], 2 ), true, 'returns expected value' );
}
t.end();
});
Expand All @@ -130,7 +130,7 @@ tape( 'the function supports providing a negative stride', function test( t ) {
actual = drotg( 0.3, 0.4, out, -2, 6 );
t.strictEqual( actual, out, 'returns expected value' );
for ( i = 0; i < out.length; i++ ) {
t.strictEqual( isAlmostSameValue( out[i], expected[i], 2 ), true, 'returns expected value' );
t.strictEqual( isAlmostSameValue( out[ i ], expected[ i ], 2 ), true, 'returns expected value' );
}
t.end();
});
Expand All @@ -147,7 +147,7 @@ tape( 'the function supports providing a positive offset', function test( t ) {
actual = drotg( 0.3, 0.4, out, 1, 1 );
t.strictEqual( actual, out, 'returns expected value' );
for ( i = 0; i < out.length; i++ ) {
t.strictEqual( isAlmostSameValue( out[i], expected[i], 2 ), true, 'returns expected value' );
t.strictEqual( isAlmostSameValue( out[ i ], expected[ i ], 2 ), true, 'returns expected value' );
}
t.end();
});
Expand All @@ -164,7 +164,7 @@ tape( 'the function supports providing both a stride and offset', function test(
actual = drotg( 0.3, 0.4, out, 2, 2 );
t.strictEqual( actual, out, 'returns expected value' );
for ( i = 0; i < out.length; i++ ) {
t.strictEqual( isAlmostSameValue( out[i], expected[i], 2 ), true, 'returns expected value' );
t.strictEqual( isAlmostSameValue( out[ i ], expected[ i ], 2 ), true, 'returns expected value' );
}
t.end();
});
10 changes: 5 additions & 5 deletions lib/node_modules/@stdlib/blas/base/drotg/test/test.main.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ tape( 'the function computes a Givens plane rotation', function test( t ) {
];

for ( i = 0; i < values.length; i++ ) {
e = new Float64Array( expected[i] );
e = new Float64Array( expected[ i ] );
out = drotg( values[i][0], values[i][1] );
for ( j = 0; j < out.length; j++ ) {
t.strictEqual( isAlmostSameValue( out[j], e[j], 2 ), true, 'returns expected value' );
t.strictEqual( isAlmostSameValue( out[ j ], e[ j ], 2 ), true, 'returns expected value' );
}
}
t.end();
Expand All @@ -85,17 +85,17 @@ tape( 'the function returns an array of NaNs if provided a rotational eliminatio

actual = drotg( NaN, 1.0 );
for ( i = 0; i < actual.length; i++ ) {
t.strictEqual( isnan( actual[i] ), true, 'returns expected value' );
t.strictEqual( isnan( actual[ i ] ), true, 'returns expected value' );
}

actual = drotg( 1.0, NaN );
for ( i = 0; i < actual.length; i++ ) {
t.strictEqual( isnan( actual[i] ), true, 'returns expected value' );
t.strictEqual( isnan( actual[ i ] ), true, 'returns expected value' );
}

actual = drotg( NaN, NaN );
for ( i = 0; i < actual.length; i++ ) {
t.strictEqual( isnan( actual[i] ), true, 'returns expected value' );
t.strictEqual( isnan( actual[ i ] ), true, 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ tape( 'the created function evaluates the pdf for `x` given small `c`', function
x = smallC.x;
c = smallC.c;
for ( i = 0; i < x.length; i++ ) {
pdf = factory( c[i] );
y = pdf( x[i] );
pdf = factory( c[ i ] );
y = pdf( x[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 3 ), true, 'returns expected value' );
}
t.end();
Expand All @@ -134,8 +134,8 @@ tape( 'the created function evaluates the pdf for `x` given a medium `c`', funct
x = mediumC.x;
c = mediumC.c;
for ( i = 0; i < x.length; i++ ) {
pdf = factory( c[i] );
y = pdf( x[i] );
pdf = factory( c[ i ] );
y = pdf( x[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 3 ), true, 'returns expected value' );
}
t.end();
Expand All @@ -153,8 +153,8 @@ tape( 'the created function evaluates the pdf for `x` given a large `c`', functi
x = largeC.x;
c = largeC.c;
for ( i = 0; i < x.length; i++ ) {
pdf = factory( c[i] );
y = pdf( x[i] );
pdf = factory( c[ i ] );
y = pdf( x[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 2 ), true, 'returns expected value' );
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ tape( 'the function evaluates the pdf for `x` given small parameter `c`', opts,
x = smallC.x;
c = smallC.c;
for ( i = 0; i < x.length; i++ ) {
y = pdf( x[i], c[i] );
if ( expected[i] !== null ) {
y = pdf( x[ i ], c[ i ] );
if ( expected[ i ] !== null ) {
t.strictEqual( isAlmostSameValue( y, expected[ i ], 3 ), true, 'returns expected value' );
}
}
Expand All @@ -127,8 +127,8 @@ tape( 'the function evaluates the pdf for `x` given medium parameter `c`', opts,
x = mediumC.x;
c = mediumC.c;
for ( i = 0; i < x.length; i++ ) {
y = pdf( x[i], c[i] );
if ( expected[i] !== null ) {
y = pdf( x[ i ], c[ i ] );
if ( expected[ i ] !== null ) {
t.strictEqual( isAlmostSameValue( y, expected[ i ], 3 ), true, 'returns expected value' );
}
}
Expand All @@ -146,8 +146,8 @@ tape( 'the function evaluates the pdf for `x` given large parameter `c`', opts,
x = largeC.x;
c = largeC.c;
for ( i = 0; i < x.length; i++ ) {
y = pdf( x[i], c[i] );
if ( expected[i] !== null ) {
y = pdf( x[ i ], c[ i ] );
if ( expected[ i ] !== null ) {
t.strictEqual( isAlmostSameValue( y, expected[ i ], 2 ), true, 'returns expected value' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ tape( 'the function evaluates the pdf for `x` given small parameter `c`', functi
x = smallC.x;
c = smallC.c;
for ( i = 0; i < x.length; i++ ) {
y = pdf( x[i], c[i] );
y = pdf( x[ i ], c[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 3 ), true, 'returns expected value' );
}
t.end();
Expand All @@ -116,7 +116,7 @@ tape( 'the function evaluates the pdf for `x` given medium parameter `c`', funct
x = mediumC.x;
c = mediumC.c;
for ( i = 0; i < x.length; i++ ) {
y = pdf( x[i], c[i] );
y = pdf( x[ i ], c[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 3 ), true, 'returns expected value' );
}
t.end();
Expand All @@ -133,7 +133,7 @@ tape( 'the function evaluates the pdf for `x` given large parameter `c`', functi
x = largeC.x;
c = largeC.c;
for ( i = 0; i < x.length; i++ ) {
y = pdf( x[i], c[i] );
y = pdf( x[ i ], c[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 2 ), true, 'returns expected value' );
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ tape( 'the function evaluates the cdf for `x` given parameter `lambda`', functio
x = data.x;
lambda = data.lambda;
for ( i = 0; i < x.length; i++ ) {
y = cdf( x[i], lambda[i] );
y = cdf( x[ i ], lambda[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 0 ), true, 'returns expected value' );
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ tape( 'the created function evaluates the cdf for `x` given parameter `lambda`',
x = data.x;
lambda = data.lambda;
for ( i = 0; i < x.length; i++ ) {
cdf = factory( lambda[i] );
y = cdf( x[i] );
cdf = factory( lambda[ i ] );
y = cdf( x[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 0 ), true, 'returns expected value' );
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ tape( 'the function evaluates the cdf for `x` given parameter `lambda`', opts, f
x = data.x;
lambda = data.lambda;
for ( i = 0; i < x.length; i++ ) {
y = cdf( x[i], lambda[i] );
y = cdf( x[ i ], lambda[ i ] );
t.strictEqual( isAlmostSameValue( y, expected[ i ], 0 ), true, 'returns expected value' );
}
t.end();
Expand Down
18 changes: 9 additions & 9 deletions lib/node_modules/@stdlib/stats/ttest/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tape( 'the function throws an error if the `x` argument is not a numeric array',
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand All @@ -86,7 +86,7 @@ tape( 'the function throws an error if the `x` array has less than two elements'
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), Error, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), Error, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand All @@ -113,7 +113,7 @@ tape( 'the function throws an error if the `y` argument is not a numeric array',
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand All @@ -134,7 +134,7 @@ tape( 'the function throws an error if the `x` and `y` arguments are arrays of d
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), Error, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), Error, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand All @@ -160,7 +160,7 @@ tape( 'the function throws an error if provided an invalid option', function tes
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}

t.throws( badValue( 'not one of less, greater or two-sided' ), Error, 'throws an error when provided not less, greater or two-sided' );
Expand All @@ -185,7 +185,7 @@ tape( 'the function throws an error if the `alpha` option is a numeric value out
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), RangeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand Down Expand Up @@ -565,7 +565,7 @@ tape( 'the function returns an object with a `.print()` method that throws an er
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand Down Expand Up @@ -600,7 +600,7 @@ tape( 'the function returns an object with a `.print()` method that throws an er
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand Down Expand Up @@ -637,7 +637,7 @@ tape( 'the function returns an object with a `.print()` method that throws an er
];

for ( i = 0; i < values.length; i++ ) {
t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
}
t.end();

Expand Down
Loading
Loading