Hi all,
There was a lot of discussion a long while back about how Numeric treats erros in the middle of an array operation. The way it works is if one operation in an array has a problem (overflow, division by zero, etc), an exception is returned. You have no idea which element caused the problem, and teh whole operation grinds to a halt. Personally, I would MUCH prefer MATLAB's way of handling this: the problematic operation results in a -Inf, Inf, or NaN result for that element, and the rest of the array operation can continue. MATLAB also provides utility functions along the line of isnan, isinf, etc, so you can check for the problematic areas later.
There was a fair bit of disagreement over whether Numeric should act similarly, as well as the problem that not all compilers have the required IEEE support to make this work.
Anyway, how does numarray handle this issue? I'd love to have the MATLAB behaviour...I'm writing this because I'm about to have to write a bunch of code to keep making sure I don't pass a 0 into log(), when I'd be much happier if I could just replace the NaNs with what I want later.
-Chris