@@ -33,7 +33,7 @@ var numel = require( '@stdlib/ndarray-base-numel' );
33
33
var slice = require ( '@stdlib/ndarray-base-slice' ) ;
34
34
var nextCartesianIndex = require ( '@stdlib/ndarray-base-next-cartesian-index' ) . assign ;
35
35
var args2multislice = require ( '@stdlib/slice-base-args2multislice' ) ;
36
- var format = require ( '@stdlib/string-format ' ) ;
36
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
37
37
38
38
39
39
// MAIN //
@@ -94,23 +94,23 @@ function nditerRows( x ) {
94
94
var i ;
95
95
96
96
if ( ! isndarrayLike ( x ) ) {
97
- throw new TypeError ( format ( 'invalid argument. First argument must be an ndarray. Value: `%s`. ' , x ) ) ;
97
+ throw new TypeError ( format ( '1jx4f ' , x ) ) ;
98
98
}
99
99
opts = {
100
100
'writable' : false
101
101
} ;
102
102
if ( arguments . length > 1 ) {
103
103
options = arguments [ 1 ] ;
104
104
if ( ! isPlainObject ( options ) ) {
105
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
105
+ throw new TypeError ( format ( '1jx2V ' , options ) ) ;
106
106
}
107
107
if ( hasOwnProp ( options , 'readonly' ) ) {
108
108
if ( ! isBoolean ( options . readonly ) ) {
109
- throw new TypeError ( format ( 'invalid option. `%s` option must be a boolean. Option: `%s`. ' , 'readonly' , options . readonly ) ) ;
109
+ throw new TypeError ( format ( '1jx2o ' , 'readonly' , options . readonly ) ) ;
110
110
}
111
111
opts . writable = ! options . readonly ;
112
112
if ( opts . writable && isReadOnly ( x ) ) {
113
- throw new Error ( format ( 'invalid option. Cannot write to read-only array. ' ) ) ;
113
+ throw new Error ( format ( '1jxF4 ' ) ) ;
114
114
}
115
115
}
116
116
}
@@ -120,7 +120,7 @@ function nditerRows( x ) {
120
120
121
121
// Ensure that the input array has sufficient dimensions...
122
122
if ( ndims < 2 ) {
123
- throw new TypeError ( 'invalid argument. First argument must be an ndarray having at least two dimensions.' ) ;
123
+ throw new TypeError ( format ( '1jxF2' ) ) ;
124
124
}
125
125
// Check whether the input array is empty...
126
126
N = numel ( shape ) ;
0 commit comments