[SciPy-Dev] adding chkfinite flags to linalg functions

Bruce Southey bsouthey@gmail....
Fri Aug 26 10:38:50 CDT 2011


On 08/26/2011 09:40 AM, Nathaniel Smith wrote:
>
> Would calling it check_finite instead be too horrible?
>
> - Nathaniel
>
> On Aug 26, 2011 2:47 AM, "Ralf Gommers" <ralf.gommers@googlemail.com 
> <mailto:ralf.gommers@googlemail.com>> wrote:
> > Hi,
> >
> > https://github.com/scipy/scipy/pull/48 adds a chkfinite flag to 
> scipy.linalg
> > functions that allows for disabling a check on whether there are 
> infs/nans
> > in the array, which can be a speed gain if you already know that 
> there's no
> > infs/nans in your input array.
> >
> > Is anyone opposed to merging this?
> >
> > Ralf
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
I do oppose this because I do not think it is the correct solution to an 
apparent issue of computational speed. I do say apparent because there 
is no code and no timings to support it.

The proposed argument is really not a check but to avoid something that 
has to be done in order to obtain a valid outcome.  Hence a possible 
reason why the original author put this check in these functions.  If we 
want to avoid this then we need to change the workflow by breaking this 
into two steps rather than this approach.

All this patch does is say if you want to go 'fast' then set 
'chkfinite=False' regardless of type of input and fails to address any 
issue. We quite often see on numpy/scipy lists where a user has made 
incorrect assumptions about their input which is will not catch or catch 
at the end.

I do not know if Chris provided any tickets for the issues he pointed 
out in:
http://mail.scipy.org/pipermail/scipy-dev/2011-July/016386.html
"But if you pass a numpy array with inf's in it, then it hangs."

This should have a ticket with an clear easy example because it 
highlights a large problem.


I also agree with Nathaniel that the name of the argument is bad but 
check_finite would not solve my issue with the name.

Yes, I am being negative because this is a community and it needs to be 
shown that this patch will improve scipy as whole.

Bruce


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20110826/22673385/attachment.html 


More information about the SciPy-Dev mailing list