[SciPy-user] bvp
Pauli Virtanen
pav at iki.fi
Fri Apr 11 17:08:59 EDT 2008
Hi Nils,
Fri, 11 Apr 2008 20:03:24 +0200, Nils Wagner wrote:
> I installed bvp using the mercurial repository
>
> hg clone static-http://www.iki.fi/pav/hg/bvp.hg bvp.hg
>
> The second example doesn't work for me. Here is the output
>
> /usr/bin/python -i ex2.py
> 1.0
> unexpected array size: new_size=1, got array with arr_size=0
> Traceback (most recent call last):
> File "ex2.py", line 61, in ?
> coarsen_initial_guess_mesh=True)
> File "/usr/lib/python2.4/site-packages/bvp/colnew.py",
> line 522, in solve
> vectorized_guess)
> _colnew.error: failed in converting 8th argument `fixpnt' of
> _colnew.colnew to C/Fortran array
Should also be fixed in 0.2.2 and current bvp.hg. (And yep, it was also
caught by automated tests.)
The cause is that apperently something changed in f2py between numpy
1.0.4 and 1.0.5: in colnew.pyf I have
integer, dimension(11), intent(in) :: ipar
double precision, dimension(ipar[10]), intent(in) :: fixpnt
However, f2py bugs out with the "failed in converting" if ipar[10] == 0
and fixpnt.size == 0, which I don't think it did in 1.0.3 or 1.0.4. If
fixed this by making fixpnt a shape = (1,) array even for ipar[10] == 0,
and it appears to work on numpy 1.0.2, 1.0.4, 1.0.5, even though I don't
know whether it should.
--
Pauli Virtanen
More information about the SciPy-User
mailing list