Turn off ZeroDivisionError?

Grant Edwards grante at visi.com
Fri Feb 15 13:38:14 EST 2008


On 2008-02-15, Mark Dickinson <dickinsm at gmail.com> wrote:

>> If you're doing such serious number-crunching that you really
>> want to handle NANs, you're probably not writing in Python
>> anyway.

I disagree completely.  I do a lot of number crunching in
Python where I want IEEE NaN and Inf behavior.  Speed is a
completely orthogonal issue.

> If you're worried about speed, then I agree you probably
> shouldn't be writing in Python.

Even if you are worried about speed, using tools like like
numpy can do some pretty cool stuff.

> But I can imagine there are use-cases for nonstop arithmetic
> with nans and infs where speed isn't the topmost concern.

Frankly, I don't see that speed has anything to do with it at
all.  I use Python for number-crunching because it's easy to
program in.  When people complain about not getting the right
results, replying with "if you want something fast, don't use
Python" makes no sense.

-- 
Grant Edwards                   grante             Yow! I put aside my copy
                                  at               of "BOWLING WORLD" and
                               visi.com            think about GUN CONTROL
                                                   legislation...



More information about the Python-list mailing list