[SciPy-user] bvp

Agile Aspect agile.aspect@gmail....
Tue Apr 15 00:15:01 CDT 2008

Hi - I tried version 0.2.2 using Python 2.4.2 from the command
line and it works great!

I have a related question which may be off topic.

When I run this test script from inside Eclipse using Python/Qt4
(the same C based Python I used to test bvp from the command
line) it generates the following error

                Traceback (most recent call last):
"/home/ken/projects/workspace/cpp/bvp/src/test/ex1.py", line 24, in ?
                 solution = bvp.colnew.solve(
                AttributeError: 'module' object has no attribute 'colnew'

Any ideas as to what might be causing this problem?

Is this permission problem? Would it be possible to use reflection
to get around it?

I've been using Eclipse/Python/Q4t for a couple of years and this
is the first time I've had this problem.

Any help would be greatly appreciated.

-- Ken

Pauli Virtanen wrote:
> 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.
Article. VI. Clause 3 of the constitution of the United States states: 

"The Senators and Representatives before mentioned, and the Members of 
the several State Legislatures, and all executive and judicial Officers, 
both of the United States and of the several States, shall be bound by 
Oath or Affirmation, to support this Constitution; but no religious Test 
shall ever be required as a Qualification to any Office or public Trust 
under the United States." 

More information about the SciPy-user mailing list