[Python-Dev] RE: [Numpy-discussion] RE: Possible bug (was Re: numpy, overflow, inf, ieee, and rich comparison)
Steven D. Majewski
Thu, 12 Oct 2000 14:25:44 -0400 (EDT)
On Thu, 12 Oct 2000 email@example.com wrote:
> > The idea that your calculation should blow up and you should
> > check it and resubmit your job sounds just so ancient-20th-century-
> > Fortran-JCL-and-punched-cards-technology!
> Long-running jobs are still with us, even there's neither Fortran nor
> JCL in them. And for these applications, stopping is better than going
> on with nonsense values. On the other hand, as you point out, exceptions
> for math errors are a bit of a pain for interactive work.
> So how about making this a run-time option? I'd choose exceptions by
> default and Infs and Nans by specifying a command-line option, but
> there are certainly others who would prefer it the other way round.
> What matters most to me is that the choice is possible somehow.
I agree entirely!
Maybe I was being a bit too glib, but I didn't mean to imply that
wanting it to halt or throw an exception on errors is wrongheaded.
I just wanted to make sure the counter-case to what Paul was saying
also got heard: Yes-- underflows or infinities where they aren't
expected are usually a sign that something is very wrong somewhere.
But in the case where the vector holds independent observations or
data points, then usually what it means is that there's something
wrong with *that* data point -- miscallibrated or mislabeled -- but
no reason not to complete the calculations for all of the other
Scaling or doing projections for interactive graphics is another
case where bad points are often better than throwing an exception.
( And it's a pain to have to remember to lambda wrap all the function
calls with some sort of guard when you'ld be happy to get NaNs. )
I also mostly agree with Tim, except that I'm not sure that bad or
incomplete ieee support is always better than none at all.
---| Steven D. Majewski (804-982-0831) <sdm7g@Virginia.EDU> |---
---| Department of Molecular Physiology and Biological Physics |---
---| University of Virginia Health Sciences Center |---
---| P.O. Box 10011 Charlottesville, VA 22906-0011 |---
"All operating systems want to be unix,
All programming languages want to be lisp."