Skip to content

Commit

Permalink
refactor: query default dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jan 16, 2024
1 parent 8e12207 commit e50f36e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/node_modules/@stdlib/array/typed-complex/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@
// MODULES //

var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var format = require( '@stdlib/string/format' );
var ctors = require( '@stdlib/array/typed-complex-ctors' );
var defaults = require( '@stdlib/array/defaults' );
var format = require( '@stdlib/string/format' );


// VARIABLES //

var DEFAULT_DTYPE = defaults.get( 'dtypes.complex_floating_point' );


// MAIN //
Expand Down Expand Up @@ -119,7 +125,7 @@ function complexarray() {
nargs -= 1;
dtype = arguments[ nargs ];
} else {
dtype = 'complex128';
dtype = DEFAULT_DTYPE;
}
ctor = ctors( dtype );
if ( ctor === null ) {
Expand Down

0 comments on commit e50f36e

Please sign in to comment.