Skip to content

Commit 14d1fa5

Browse files
committed
Auto-generated commit
1 parent add2d79 commit 14d1fa5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/main.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var dtype = require( '@stdlib/complex-dtype' );
2828
var ctors = require( '@stdlib/array-typed-float-ctors' );
2929
var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );
3030
var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );
31+
var format = require( '@stdlib/string-format' );
3132
var genreal = require( './generic_real.js' );
3233
var gencmplx = require( './generic_complex.js' );
3334
var typedreal = require( './typed_real.js' );
@@ -75,32 +76,32 @@ function linspace( start, stop, len ) {
7576
dt1 = dtype( start );
7677
if ( dt1 === null ) {
7778
if ( !isComplexLike( start ) ) {
78-
throw new TypeError( 'invalid argument. First argument must be either a real or complex number. Value: `' + start + '`.' );
79+
throw new TypeError( format( 'invalid argument. First argument must be either a real or complex number. Value: `%s`.', start ) );
7980
}
8081
dt1 = 'complex128';
8182
}
8283
flg = true;
8384
} else if ( !isNumber( start ) || isnan( start ) ) {
84-
throw new TypeError( 'invalid argument. First argument must be either a real or complex number. Value: `' + start + '`.' );
85+
throw new TypeError( format( 'invalid argument. First argument must be either a real or complex number. Value: `%s`.', start ) );
8586
} else {
8687
dt1 = 'float64';
8788
}
8889
if ( typeof stop === 'object' ) {
8990
dt2 = dtype( stop );
9091
if ( dt2 === null ) {
9192
if ( !isComplexLike( stop ) ) {
92-
throw new TypeError( 'invalid argument. Second argument must be either a real or complex number. Value: `' + stop + '`.' );
93+
throw new TypeError( format( 'invalid argument. Second argument must be either a real or complex number. Value: `%s`.', stop ) );
9394
}
9495
dt2 = 'complex128';
9596
}
9697
flg = true;
9798
} else if ( !isNumber( stop ) || isnan( stop ) ) {
98-
throw new TypeError( 'invalid argument. Second argument must be either a real or complex number. Value: `' + stop + '`.' );
99+
throw new TypeError( format( 'invalid argument. Second argument must be either a real or complex number. Value: `%s`.', stop ) );
99100
} else {
100101
dt2 = 'float64';
101102
}
102103
if ( !isNonNegativeInteger( len ) ) {
103-
throw new TypeError( 'invalid argument. Third argument must be a nonnegative integer. Value: `' + len + '`.' );
104+
throw new TypeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%s`.', len ) );
104105
}
105106
opts = {
106107
'endpoint': defaults.endpoint

0 commit comments

Comments
 (0)