Skip to content

Commit 40689d0

Browse files
committed
fix: correct benchmark input wrapping in ndarray/base/output-order
The benchmark double-wrapped the input list and used a `Layout` type assertion that diverges from the declared `Order` return type. Pass the inner list of ndarrays directly, add the missing argument-spacing in `array()` calls, and align the type-test annotation with the declaration.
1 parent 1481c95 commit 40689d0

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/node_modules/@stdlib/ndarray/base/output-order/benchmark/benchmark.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ bench( pkg, function benchmark( b ) {
5151
var i;
5252

5353
arr = [
54-
[ array( 'row-major' ), array( 'row-major') ],
55-
[ array( 'row-major' ), array( 'column-major') ],
56-
[ array( 'column-major' ), array( 'column-major') ]
54+
[ array( 'row-major' ), array( 'row-major' ) ],
55+
[ array( 'row-major' ), array( 'column-major' ) ],
56+
[ array( 'column-major' ), array( 'column-major' ) ]
5757
];
5858

5959
b.tic();
6060
for ( i = 0; i < b.iterations; i++ ) {
61-
out = outputOrder( [ arr[ i%arr.length ] ] );
61+
out = outputOrder( arr[ i%arr.length ] );
6262
if ( typeof out !== 'string' ) {
6363
b.fail( 'should return a string' );
6464
}

lib/node_modules/@stdlib/ndarray/base/output-order/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import outputOrder = require( './index' );
2626
{
2727
const x = zeros( [ 2, 2 ] );
2828
const y = zeros( [ 2, 2 ] );
29-
outputOrder( [ x, y ] ); // $ExpectType Layout
29+
outputOrder( [ x, y ] ); // $ExpectType Order
3030
}
3131

3232
// The compiler throws an error if the function is provided a first argument which is not an array-like object of ndarrays...

0 commit comments

Comments
 (0)