@@ -58,7 +58,7 @@ var defaults = require( '@stdlib/ndarray-defaults' );
58
58
var isAccessorArray = require ( '@stdlib/array-base-assert-is-accessor-array' ) ;
59
59
var accessorSetter = require ( '@stdlib/array-base-accessor-setter' ) ;
60
60
var setter = require ( '@stdlib/array-base-setter' ) ;
61
- var format = require ( '@stdlib/string-format ' ) ;
61
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
62
62
var validate = require ( './validate.js' ) ;
63
63
64
64
@@ -294,10 +294,10 @@ function Random( prng, idtypes, odtypes, policies, options ) {
294
294
return new Random ( prng , idtypes , odtypes , policies , options ) ;
295
295
}
296
296
if ( ! isFunction ( prng ) ) {
297
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , prng ) ) ;
297
+ throw new TypeError ( format ( 'null3c ' , prng ) ) ;
298
298
}
299
299
if ( ! isCollection ( idtypes ) ) {
300
- throw new TypeError ( format ( 'invalid argument. Second argument must be an array-like object. Value: `%s`. ' , idtypes ) ) ;
300
+ throw new TypeError ( format ( 'null2y ' , idtypes ) ) ;
301
301
}
302
302
for ( i = 0 ; i < idtypes . length ; i ++ ) {
303
303
if (
@@ -316,7 +316,7 @@ function Random( prng, idtypes, odtypes, policies, options ) {
316
316
throw new TypeError ( format ( 'invalid argument. Third argument must be an array of data types. Value: `%s`.' , odtypes ) ) ;
317
317
}
318
318
if ( ! isObject ( policies ) ) {
319
- throw new TypeError ( format ( 'invalid argument. Fourth argument must be an object. Value: `%s`. ' , policies ) ) ;
319
+ throw new TypeError ( format ( 'null43 ' , policies ) ) ;
320
320
}
321
321
if ( ! isOutputDataTypePolicy ( policies . output ) ) {
322
322
throw new TypeError ( format ( 'invalid argument. Fourth argument must be an object having a supported output data type policy. Value: `%s`.' , policies . output ) ) ;
@@ -326,7 +326,7 @@ function Random( prng, idtypes, odtypes, policies, options ) {
326
326
} ;
327
327
if ( arguments . length > 4 ) {
328
328
if ( ! isPlainObject ( options ) ) {
329
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
329
+ throw new TypeError ( format ( 'null2V ' , options ) ) ;
330
330
}
331
331
if ( hasOwnProp ( options , 'order' ) ) {
332
332
opts . order = options . order ;
@@ -404,7 +404,7 @@ setReadOnly( Random.prototype, 'generate', function generate( shape, param1, par
404
404
var i ;
405
405
406
406
if ( ! isNonNegativeIntegerArray ( shape ) && ! isEmptyCollection ( shape ) ) {
407
- throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object containing nonnegative integers. Value: `%s`. ' , shape ) ) ;
407
+ throw new TypeError ( format ( 'null5o ' , shape ) ) ;
408
408
}
409
409
opts = { } ;
410
410
if ( arguments . length > 3 ) {
@@ -547,7 +547,7 @@ setReadOnly( Random.prototype, 'assign', function assign( param1, param2, out )
547
547
throw new TypeError ( format ( 'invalid argument. Third argument must be an ndarray-like object. Value: `%s`.' , out ) ) ;
548
548
}
549
549
if ( isReadOnly ( out ) ) {
550
- throw new Error ( 'invalid argument. The output ndarray must be writable. Cannot write to a read-only ndarray.' ) ;
550
+ throw new Error ( format ( 'null1g' ) ) ;
551
551
}
552
552
sh = getShape ( out ) ;
553
553
ord = getOrder ( out ) ;
0 commit comments