Skip to content

Commit 8e12207

Browse files
committed
refactor: query default dtype
1 parent 5bccefd commit 8e12207

File tree

1 file changed

+3
-1
lines changed
  • lib/node_modules/@stdlib/array/typed/lib

1 file changed

+3
-1
lines changed

Diff for: lib/node_modules/@stdlib/array/typed/lib/main.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2424
var ctors = require( '@stdlib/array/typed-ctors' );
2525
var reinterpret128 = require( '@stdlib/strided/base/reinterpret-complex128' );
2626
var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );
27+
var defaults = require( '@stdlib/array/defaults' );
2728
var format = require( '@stdlib/string/format' );
2829

2930

3031
// VARIABLES //
3132

33+
var DEFAULT_DTYPE = defaults.get( 'dtypes.default' );
3234
var Complex64Array = ctors( 'complex64' );
3335
var Complex128Array = ctors( 'complex128' );
3436

@@ -128,7 +130,7 @@ function typedarray() {
128130
nargs -= 1;
129131
dtype = arguments[ nargs ];
130132
} else {
131-
dtype = 'float64';
133+
dtype = DEFAULT_DTYPE;
132134
}
133135
ctor = ctors( dtype );
134136
if ( ctor === null ) {

0 commit comments

Comments
 (0)