[SciPy-Dev] F2PY: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0, )
Sun Mar 11 10:36:08 CDT 2012
11.03.2012 09:45, Andreas H. kirjoitti:
> I'm trying to wrap the Fortran function sphere.f from FITPACK_. However,
> when I try to call the resulting function like this::
> I get the following error:
> ValueError: failed to create intent(cache|hide)|optional array-- must
> have defined dimensions but got (0,)
> Can someone point me to what's wrong? I cannot find my mistake ...
I'd double-check what the routines calc_spherfit_lwrk1/2 return.
Barring that, you can recompile with debug symbols on:
python setup.py build
and run your test program in gdb:
gdb --args python sometest.py
(gdb) break f2py_rout_XXX_spherfit_smth
Break on routine not yet loaded: -> yes
where XXX should be replaced with the name of the extension module.
And then step through the execution inspecting variable values
(gdb) print lwrk1
Not fun, but gets the job done.
More information about the SciPy-Dev