f90wrap
f90wrap copied to clipboard
Wrapping of intent(out) arrays inconsistent with f2py
f90wrap converts intent(out) arrays to intent(in, out). This was a deliberate design decision to allow allocatable and automatic arrays to be used. It’s hard in general to work out what size array needs to be allocated, so I decided that relying on the the user to pre-allocate from Python seemed the safest solution to reduce the chance of memory leaks.
It would be quite useful to have an option where the behaviour of f90wrap can be told to follow that of f2py
, i.e., returning intent(out)
arrays. The main interest is for consistency with the default for standard functions in python.