Skip to content

Commit 066e7e5

Browse files
committed
fix(stats): fix midrange test cases
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 56c61dc commit 066e7e5

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

lib/node_modules/@stdlib/stats/midrange/benchmark/benchmark.assign.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var bench = require( '@stdlib/bench' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var pow = require( '@stdlib/math/base/special/pow' );
26+
var format = require( '@stdlib/string/format' );
2627
var uniform = require( '@stdlib/random/array/uniform' );
2728
var zeros = require( '@stdlib/array/zeros' );
2829
var ndarray = require( '@stdlib/ndarray/base/ctor' );
@@ -104,7 +105,7 @@ function main() {
104105
for ( i = min; i <= max; i++ ) {
105106
len = pow( 10, i );
106107
f = createBenchmark( len );
107-
bench( pkg+':assign:dtype='+options.dtype+',len='+len, f );
108+
bench( format( '%s:assign:dtype=%s,len=%d', pkg, options.dtype, len ), f );
108109
}
109110
}
110111

lib/node_modules/@stdlib/stats/midrange/benchmark/benchmark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var bench = require( '@stdlib/bench' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var pow = require( '@stdlib/math/base/special/pow' );
26+
var format = require( '@stdlib/string/format' );
2627
var uniform = require( '@stdlib/random/array/uniform' );
2728
var ndarray = require( '@stdlib/ndarray/base/ctor' );
2829
var pkg = require( './../package.json' ).name;
@@ -98,7 +99,7 @@ function main() {
9899
for ( i = min; i <= max; i++ ) {
99100
len = pow( 10, i );
100101
f = createBenchmark( len );
101-
bench( pkg+':dtype='+options.dtype+',len='+len, f );
102+
bench( format( '%s:dtype=%s,len=%d', pkg, options.dtype, len ), f );
102103
}
103104
}
104105

lib/node_modules/@stdlib/stats/midrange/docs/repl.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636

3737
{{alias}}.assign( x, out[, options] )
38-
Computes the mid-range along one or more ndarray dimensions and assigns results
39-
to a provided output ndarray.
38+
Computes the mid-range along one or more ndarray dimensions and assigns
39+
results to a provided output ndarray.
4040

4141
Parameters
4242
----------
@@ -68,4 +68,6 @@
6868
> var bool = ( out === y )
6969
true
7070

71+
See Also
72+
--------
7173

lib/node_modules/@stdlib/stats/midrange/test/test.assign.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ tape( 'the function performs a reduction on an ndarray (no dimensions, column-ma
628628
actual = midrange( x, out, {
629629
'dims': []
630630
});
631-
expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
631+
expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
632632

633633
t.strictEqual( actual, out, 'returns expected value' );
634634
t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );

lib/node_modules/@stdlib/stats/midrange/test/test.main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ tape( 'the function performs a reduction on an ndarray (no dimensions, column-ma
551551
'dims': [],
552552
'keepdims': false
553553
});
554-
expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
554+
expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
555555

556556
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
557557
t.strictEqual( String( getDType( actual ) ), 'generic', 'returns expected value' );
@@ -566,7 +566,7 @@ tape( 'the function performs a reduction on an ndarray (no dimensions, column-ma
566566
'dims': [],
567567
'keepdims': true
568568
});
569-
expected = [ [ -1.0, 2.0 ], [ -3.0, 4.0 ] ];
569+
expected = [ [ -1.0, -3.0 ], [ 2.0, 4.0 ] ];
570570

571571
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
572572
t.strictEqual( String( getDType( actual ) ), 'generic', 'returns expected value' );

0 commit comments

Comments
 (0)