[f2py] problems with parameters and common blocks
"teichmann.clemens" <teichmann.clemens-gM/[email protected]> Mon, 15 Aug 2011 08:30:26 +0200
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <CACEL+dQ-yNV33azoKr+E1McxC15_4Vbt1AKzaecLVjVgWEzs2Q@mail.gmail.com> |
Hello, I'm developing a python interface for an xml data set and an old fortran program (xml -> python -> fortran). Because the main computation subroutine needs many variables, the values are written to variables in common-blocks. In this common blocks are also arrays that have the size of previously given parameters. These parameters are just maximum values (e.g. a maximum amount of sth to compute). So an arrays is initiated with the size 20 even though there were just the first four entries set. In the subroutine, e.g. for-loops just iterate over those four entries using a previously given counter. My problem is that f2py just know the max value (which makes sense) and so if i handover a python list with just those four values, there is an system error: SystemError: error return without exception set 0-th dimension must be fixed to 22 but got 4 Is there any possibilty to either change the parameters before the modul is implemented or change the size of the arrays? I thought of using dummy entries for the python lists, but this isn't my desired solution. best regards, Clemens Teichmann _______________________________________________ f2py-users mailing list f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] http://cens.ioc.ee/mailman/listinfo/f2py-users