[Numpy-discussion] Unexpected RuntimeWarning
Fri Nov 23 05:42:12 CST 2012
Bob Dowling <rjd4+numpy <at> cam.ac.uk> writes:
> I'm guessing that numpy.where() is evaluating the complete arccos and
> arccosh arrays and therefore getting invalid arguments.
> Now, I can turn off the warnings with numpy.seterr(invalid='ignore') but
> that's not what I would regard as good practice.
> Is there a "numpythonic" way to address the issue?
Correct, the arguments are evaluated first, due to how Python semantics work.
You may want to use this:
More information about the NumPy-Discussion