Skip to content

Commit 3146bc0

Browse files
authored
refactor: avoid unnecessary dtype resolution
Signed-off-by: Athan <[email protected]>
1 parent 375b190 commit 3146bc0

File tree

1 file changed

+1
-1
lines changed
  • lib/node_modules/@stdlib/ndarray/flatten/lib

1 file changed

+1
-1
lines changed

lib/node_modules/@stdlib/ndarray/flatten/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function flatten( x, options ) {
351351

352352
// Create a view on top of output ndarray having the same shape as the input ndarray:
353353
st = ( xsh.length > 0 ) ? shape2strides( xsh, opts.order ) : [ 0 ];
354-
view = ndarray( getDType( y ), getData( y ), xsh, st, 0, opts.order );
354+
view = ndarray( opts.dtype, getData( y ), xsh, st, 0, opts.order );
355355

356356
// Copy elements to the output ndarray:
357357
assign( [ x, view ] );

0 commit comments

Comments
 (0)