@@ -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 //
@@ -88,23 +88,23 @@ function nditerMatrices( x ) {
88
88
var i ;
89
89
90
90
if ( ! isndarrayLike ( x ) ) {
91
- throw new TypeError ( format ( 'invalid argument. First argument must be an ndarray. Value: `%s`. ' , x ) ) ;
91
+ throw new TypeError ( format ( '1lN4f ' , x ) ) ;
92
92
}
93
93
opts = {
94
94
'writable' : false
95
95
} ;
96
96
if ( arguments . length > 1 ) {
97
97
options = arguments [ 1 ] ;
98
98
if ( ! isPlainObject ( options ) ) {
99
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
99
+ throw new TypeError ( format ( '1lN2V ' , options ) ) ;
100
100
}
101
101
if ( hasOwnProp ( options , 'readonly' ) ) {
102
102
if ( ! isBoolean ( options . readonly ) ) {
103
- throw new TypeError ( format ( 'invalid option. `%s` option must be a boolean. Option: `%s`. ' , 'readonly' , options . readonly ) ) ;
103
+ throw new TypeError ( format ( '1lN2o ' , 'readonly' , options . readonly ) ) ;
104
104
}
105
105
opts . writable = ! options . readonly ;
106
106
if ( opts . writable && isReadOnly ( x ) ) {
107
- throw new Error ( format ( 'invalid option. Cannot write to read-only array. ' ) ) ;
107
+ throw new Error ( format ( '1lNF4 ' ) ) ;
108
108
}
109
109
}
110
110
}
@@ -114,7 +114,7 @@ function nditerMatrices( x ) {
114
114
115
115
// Ensure that the input array has sufficient dimensions...
116
116
if ( ndims < 3 ) {
117
- throw new TypeError ( 'invalid argument. First argument must be an ndarray having at least three dimensions.' ) ;
117
+ throw new TypeError ( format ( '1lNFA' ) ) ;
118
118
}
119
119
// Check whether the input array is empty...
120
120
N = numel ( shape ) ;
0 commit comments