[SciPy-Dev] adding chkfinite flags to linalg functions
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" <email@example.com
> <mailto:firstname.lastname@example.org>> wrote:
> > Hi,
> > https://github.com/scipy/scipy/pull/48 adds a chkfinite flag to
> > functions that allows for disabling a check on whether there are
> > 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
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
"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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev