[SciPy-Dev] adding chkfinite flags to linalg functions
Martin Teichmann
martin.teichmann at mbi-berlin.de
Mon Sep 19 03:39:55 EDT 2011
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.
A different question is what happens when we don't copy the array. Then
we have to iterate through the array to find possible infintes. But I
consider that a minor issure: pure reading is typically really fast,
and it is certainly faster than what we are doing currently.
Greetings
Martin
--
Max-Born-Institut
Max-Born-Straße 2a
12489 Berlin
+49 30 6392 1234
More information about the SciPy-Dev
mailing list