We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff4e25b commit 5bccefdCopy full SHA for 5bccefd
lib/node_modules/@stdlib/array/ones/lib/main.js
@@ -23,12 +23,14 @@
23
var Complex128 = require( '@stdlib/complex/float64' );
24
var Complex64 = require( '@stdlib/complex/float32' );
25
var full = require( '@stdlib/array/full' );
26
+var defaults = require( '@stdlib/array/defaults' );
27
28
29
// VARIABLES //
30
31
var Z128 = new Complex128( 1.0, 0.0 );
32
var Z64 = new Complex64( 1.0, 0.0 );
33
+var DEFAULT_DTYPE = defaults.get( 'dtypes.default' );
34
35
36
// MAIN //
@@ -57,7 +59,7 @@ function ones( length ) {
57
59
if ( arguments.length > 1 ) {
58
60
dtype = arguments[ 1 ];
61
} else {
- dtype = 'float64';
62
+ dtype = DEFAULT_DTYPE;
63
}
64
if ( dtype === 'complex128' ) {
65
value = Z128;
0 commit comments