using allocatable arrays from modules in f2py
问题 I'm having issues with allocatable arrays in f2py . In the code below (stored in mymod.f90 ), I created two modules, vars and worker : vars stores and allocates the array b worker contains subroutines to work with this array from vars . The first worker -subroutine adds a scalar to b . This works as expected. The problem is with the next routine that should add a vector of matching first dimension to the array b . The implemented subroutine add_vector2 works, but needs the dimension of the