[f2py] Errors with size 0 arrays

Ed <[email protected]> Tue, 9 Jul 2013 15:23:19 +0000 (UTC)
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
I have the following subroutine:

      SUBROUTINE test(u,outarr)
         implicit none
         INTEGER, INTENT(in) :: u
         DOUBLE PRECISION, INTENT(out), DIMENSION(u) :: outarr
         END SUBROUTINE

f2py compiles it fine, and I can import it without problem. For all positive 
integers, the subroutine runes fine, giving me an array of size u with all 
values zero. However, upon trying to run the above with u=0, I get the 
following error:

ValueError: failed to create intent(cache|hide)|optional array-- must have 
defined dimensions but got (0,)

How do I go about fixing this, so I get an array of size 0?