[SciPy-user] Enabling NaN-usage in F77 code on Windows
Wed Oct 29 17:56:07 CDT 2008
You would be right about the NAN not being a built-in symbol...any
suggestions for making a NAN? I don't know if there's a a generic way that
will make it back to Python correctly.
On Wed, Oct 29, 2008 at 6:37 PM, Robert Kern <firstname.lastname@example.org> wrote:
> On Wed, Oct 29, 2008 at 17:23, Wes McKinney <email@example.com> wrote:
> > I'm having some trouble getting NaN's to return from f77 code running
> > latest f2py in both g77 and gfortran. I would prefer to use gfortran but
> > whenever I set a result value = NAN, it comes back to Python as 0. Has
> > anyone tackled this issue? I am new to using f2py, have been moving along
> > fine with everything else but ran into this.
> Is NAN a builtin symbol in FORTRAN-77? I don't think it is. I think
> what's happening is that the compiler sees you using the name and
> implicitly creates a variable for it and initializes it to 0. You will
> have to make your own NAN.
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user