Re: [f2py] line length
Pearu Peterson <[email protected]> Mon, 9 Aug 2010 23:48:33 +0300
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 9, 2010 at 11:16 PM, Al Niessner <[email protected]> wrote: > > I am going to pretend this is a bug because it happens with all f90 code > too. Here is my command (source attached): > > f2py -c kinds.f90 constants.f90 checks.f90 > <...snip...> > Reading fortran codes... > Reading file 'kinds.f90' (format:free) > Reading file 'constants.f90' (format:free) > Reading file 'checks.f90' (format:free) > <...snip...> > get_parameters: got "unexpected EOF while parsing (<string>, line 1)" on > '6.283185307179586476925286766559005768394_pr' > In: :untitled:constants.f90:constants > get_parameters: got "unexpected EOF while parsing (<string>, line 1)" on > '3.141592653589793238462643383279502884197_pr' > In: :untitled:constants.f90:constants > get_parameters: got "unexpected EOF while parsing (<string>, line 1)" on > '1.570796326794896619231321691639751442099_pr' > In: :untitled:constants.f90:constants > <...snip...> > > Since they are marked as format::free, I would not expect these errors. These messages are not related to the source format and so these .f90 files do not reproduce the original issue (where the expression string was clearly incomplete). You can ignore these messages because the result of get_parameters is used in cases like integer, parameter:: N = 10 real array(N*N) where f2py would figure out that the array has fixed size 100. Clearly f2py fails to evaluate strings like `3.14_pr` but until there is will be a report where evaluating such strings really matters for wrapper generation, I'll consider it as YAGNI. Pearu