@@ -31,7 +31,7 @@ var iteratorSymbol = require( '@stdlib/symbol-iterator' );
31
31
var zeros = require ( '@stdlib/array-base-zeros' ) ;
32
32
var numel = require ( '@stdlib/ndarray-base-numel' ) ;
33
33
var nextCartesianIndex = require ( '@stdlib/ndarray-base-next-cartesian-index' ) . assign ;
34
- var format = require ( '@stdlib/string-format ' ) ;
34
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
35
35
36
36
37
37
// MAIN //
@@ -79,19 +79,19 @@ function nditerIndices( shape ) {
79
79
var i ;
80
80
81
81
if ( ! isCollection ( shape ) ) {
82
- throw new TypeError ( format ( 'invalid argument. First argument must be an array of nonnegative integers. Value: `%s`. ' , shape ) ) ;
82
+ throw new TypeError ( format ( '1jtF5 ' , shape ) ) ;
83
83
}
84
84
opts = {
85
85
'order' : 'row-major'
86
86
} ;
87
87
if ( arguments . length > 1 ) {
88
88
options = arguments [ 1 ] ;
89
89
if ( ! isPlainObject ( options ) ) {
90
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
90
+ throw new TypeError ( format ( '1jt2V ' , options ) ) ;
91
91
}
92
92
if ( hasOwnProp ( options , 'order' ) ) {
93
93
if ( ! isOrder ( options . order ) ) {
94
- throw new TypeError ( format ( 'invalid option. `%s` option must be a recognized order. Option: `%s`. ' , 'order' , options . order ) ) ;
94
+ throw new TypeError ( format ( '1jt5C ' , 'order' , options . order ) ) ;
95
95
}
96
96
opts . order = options . order ;
97
97
}
@@ -103,7 +103,7 @@ function nditerIndices( shape ) {
103
103
sh = [ ] ;
104
104
for ( i = 0 ; i < ndims ; i ++ ) {
105
105
if ( ! isNonNegativeInteger ( shape [ i ] ) ) {
106
- throw new TypeError ( format ( 'invalid argument. First argument must be an array of nonnegative integers. Value: `%s`. ' , shape ) ) ;
106
+ throw new TypeError ( format ( '1jtF5 ' , shape ) ) ;
107
107
}
108
108
sh . push ( shape [ i ] ) ;
109
109
}
0 commit comments