@@ -33,7 +33,7 @@ var numel = require( '@stdlib/ndarray-base-numel' );
3333var slice = require ( '@stdlib/ndarray-base-slice' ) ;
3434var nextCartesianIndex = require ( '@stdlib/ndarray-base-next-cartesian-index' ) . assign ;
3535var args2multislice = require ( '@stdlib/slice-base-args2multislice' ) ;
36- var format = require ( '@stdlib/string-format ' ) ;
36+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
3737
3838
3939// MAIN //
@@ -94,23 +94,23 @@ function nditerMatrixEntries( x ) {
9494 var i ;
9595
9696 if ( ! isndarrayLike ( x ) ) {
97- throw new TypeError ( format ( 'invalid argument. First argument must be an ndarray. Value: `%s`. ' , x ) ) ;
97+ throw new TypeError ( format ( '1lP4f ' , x ) ) ;
9898 }
9999 opts = {
100100 'writable' : false
101101 } ;
102102 if ( arguments . length > 1 ) {
103103 options = arguments [ 1 ] ;
104104 if ( ! isPlainObject ( options ) ) {
105- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
105+ throw new TypeError ( format ( '1lP2V ' , options ) ) ;
106106 }
107107 if ( hasOwnProp ( options , 'readonly' ) ) {
108108 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 ( '1lP2o ' , 'readonly' , options . readonly ) ) ;
110110 }
111111 opts . writable = ! options . readonly ;
112112 if ( opts . writable && isReadOnly ( x ) ) {
113- throw new Error ( format ( 'invalid option. Cannot write to read-only array. ' ) ) ;
113+ throw new Error ( format ( '1lPF4 ' ) ) ;
114114 }
115115 }
116116 }
@@ -120,7 +120,7 @@ function nditerMatrixEntries( x ) {
120120
121121 // Ensure that the input array has sufficient dimensions...
122122 if ( ndims < 3 ) {
123- throw new TypeError ( 'invalid argument. First argument must be an ndarray having at least three dimensions.' ) ;
123+ throw new TypeError ( format ( '1lPFA' ) ) ;
124124 }
125125
126126 // Check whether the input array is empty...
0 commit comments