File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 23
23
var isndarrayLike = require ( '@stdlib/assert-is-ndarray-like' ) ;
24
24
var isReadOnly = require ( '@stdlib/ndarray-base-assert-is-read-only' ) ;
25
25
var base = require ( '@stdlib/ndarray-base-fill' ) ;
26
- var format = require ( '@stdlib/string-format ' ) ;
26
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
27
27
28
28
29
29
// MAIN //
@@ -53,10 +53,10 @@ var format = require( '@stdlib/string-format' );
53
53
*/
54
54
function fill ( x , value ) {
55
55
if ( ! isndarrayLike ( x ) ) {
56
- throw new TypeError ( format ( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`. ' , x ) ) ;
56
+ throw new TypeError ( format ( 'null5t ' , x ) ) ;
57
57
}
58
58
if ( isReadOnly ( x ) ) {
59
- throw new Error ( 'invalid argument. Cannot write to a read-only array.' ) ;
59
+ throw new Error ( format ( 'nullEs' ) ) ;
60
60
}
61
61
base ( x , value ) ;
62
62
return x ;
Original file line number Diff line number Diff line change 40
40
"@stdlib/assert-is-ndarray-like" : " ^0.2.2" ,
41
41
"@stdlib/ndarray-base-assert-is-read-only" : " ^0.2.2" ,
42
42
"@stdlib/ndarray-base-fill" : " github:stdlib-js/ndarray-base-fill#main" ,
43
- "@stdlib/string-format " : " ^0.2.2" ,
43
+ "@stdlib/error-tools-fmtprodmsg " : " ^0.2.2" ,
44
44
"@stdlib/types" : " ^0.4.3" ,
45
45
"@stdlib/error-tools-fmtprodmsg" : " ^0.2.2"
46
46
},
You can’t perform that action at this time.
0 commit comments