[SciPy-Dev] adding chkfinite flags to linalg functions

Ralf Gommers ralf.gommers@googlemail....
Mon Sep 19 11:15:49 CDT 2011


On Mon, Sep 19, 2011 at 9:39 AM, Martin Teichmann <
martin.teichmann@mbi-berlin.de> wrote:

> Hi list,
> Hi Ralph,
>
> >> * adding an "finite" intent into f2py. This is currently my preferred
> >> solution. as f2py often has to copy the data to make it available for
> FORTRAN,
> >> checking finiteness could be done while copying with virtually no
> >> loss of speed.
> >
> > Would this work in all cases? And wouldn't you get a small penalty for
> cases
> > where you don't need to use asarray_chkfinite (not sure how often this
> > happens)?
>
> That's exactly why I wanted to create a "finite" intent. Whenever
> it is needed, we declare an input parameter to have "finite" intent, and
> it will be checked, and not otherwise.
>
> Maybe I'm misunderstanding, but this happens at compile time and then
finiteness is checked at every call, right? So if you call the same function
twice, you do the check twice? This is not that uncommon I think, for
example there are many functions that do a first call to determine a work
array before the actual function call.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20110919/0e8297a1/attachment.html 


More information about the SciPy-Dev mailing list