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