@@ -33,7 +33,7 @@ var getOrder = require( '@stdlib/ndarray-order' );
33
33
var numel = require ( '@stdlib/ndarray-base-numel' ) ;
34
34
var nextCartesianIndex = require ( '@stdlib/ndarray-base-next-cartesian-index' ) . assign ;
35
35
var gcopy = require ( '@stdlib/blas-base-gcopy' ) ;
36
- var format = require ( '@stdlib/string-format ' ) ;
36
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
37
37
38
38
39
39
// MAIN //
@@ -91,7 +91,7 @@ function filter( x, options, predicate, thisArg ) {
91
91
var v ;
92
92
var i ;
93
93
if ( ! isndarrayLike ( x ) ) {
94
- throw new TypeError ( format ( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`. ' , x ) ) ;
94
+ throw new TypeError ( format ( 'null5t ' , x ) ) ;
95
95
}
96
96
if ( arguments . length < 3 ) {
97
97
clbk = options ;
@@ -111,11 +111,11 @@ function filter( x, options, predicate, thisArg ) {
111
111
ctx = thisArg ;
112
112
}
113
113
if ( ! isFunction ( clbk ) ) {
114
- throw new TypeError ( format ( 'invalid argument. Callback argument must be a function. Value: `%s`. ' , clbk ) ) ;
114
+ throw new TypeError ( format ( 'null2b ' , clbk ) ) ;
115
115
}
116
116
if ( hasOpts ) {
117
117
if ( ! isPlainObject ( opts ) ) {
118
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , opts ) ) ;
118
+ throw new TypeError ( format ( 'null2V ' , opts ) ) ;
119
119
}
120
120
if ( hasOwnProp ( opts , 'dtype' ) ) {
121
121
dt = opts . dtype ;
@@ -124,7 +124,7 @@ function filter( x, options, predicate, thisArg ) {
124
124
}
125
125
if ( hasOwnProp ( opts , 'order' ) ) {
126
126
if ( ! isOrder ( opts . order ) ) {
127
- throw new TypeError ( format ( 'invalid option. `%s` option must be a recognized order. Option: `%s`. ' , 'order' , opts . order ) ) ;
127
+ throw new TypeError ( format ( 'null5C ' , 'order' , opts . order ) ) ;
128
128
}
129
129
ord = opts . order ;
130
130
}
@@ -135,7 +135,7 @@ function filter( x, options, predicate, thisArg ) {
135
135
ctor = ctors ( dt ) ;
136
136
if ( ctor === null ) {
137
137
// The only way we should get here is if the user provided an unsupported data type, as `getDType` should error if the input array has an unrecognized/unsupported data type...
138
- throw new TypeError ( format ( 'invalid option. `%s` option must be a recognized data type. Option: `%s`. ' , 'dtype' , opts . dtype ) ) ;
138
+ throw new TypeError ( format ( 'nullBf ' , 'dtype' , opts . dtype ) ) ;
139
139
}
140
140
// Resolve the iteration order:
141
141
if ( ord === void 0 ) {
0 commit comments