Found trying to use the usual trick
to redefine GaussianFilter[ ]:
out[x_]:=Print["(*"<>ToString@x<>"*)"];
(* Redefining Circle[ ] works as expected*)
Unprotect[Circle];
Circle[a_,args__]:=
Block[{$i=True},{"Circle",a}]/;!TrueQ[$i];
Protect[Circle];
out@Circle[{0,1},1,{0,2Pi}]
(*{Circle, {0, 1}}*)
(* Redefining GaussianFilter[ ] does not*)
Unprotect[GaussianFilter];
GaussianFilter[a_,args__]:=
Block[{$j=True},{"GaussianFilter",a}]/;!TrueQ[$j];
Protect[GaussianFilter];
SetDelayed::write: Tag GaussianFilter in GaussianFilter[a_,args__] is Protected>>
When you run the redefinition the second time, it works fine. Most likely the cause of the problem is the same as discussed here. I can not say that I am fond of this language feature, to say the least.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With