Ralf Gommers
unread,Dec 6, 2009, 6:21:39 AM12/6/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scikits-b...@googlegroups.com
Hi John,
I had a look at the package after your announcement, here are some first impressions.
Installation
------------
easy_install failed for some reason (I think a problem with my system, not your setup.py), so I had to download the tarball and build with "python setup.py build_ext -i". Some basic build instructions and a link to the relevant NumPy docs would be useful. Especially info on the required Fortran compiler, as this is a constant source of errors in building NumPy. I also looked for a public repo, but couldn't find it.
Tutorial
---------
Clearly written. I found one minor error, when creating the problem definition,
boundary_points = (0, A),
should be:
boundary_points = (0, Ahx),
It would be good to use the recommended forms for imports, i.e. change:
import numpy
import numpy.array
import pylab
to:
import numpy as np
import matplotlib.pyplot as plt
Then, running the whole tutorial I get an exception:
In [25]: run ../../tmp/bvp_tutorial.py
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/Users/zouzoujing/tmp/bvp_tutorial.py in <module>()
58 solution = scikits.bvp_solver.solve(problem,
59 solution_guess = ((T10 + T2Ahx)/2.0,
---> 60 (T10 + T2Ahx)/2.0))
61 """
62 The "solve" function returns a Solution object which can be passed an array of points at which to evaluate the solution.
/Users/zouzoujing/Downloads/scikits.bvp_solver-0.3.0/scikits/bvp_solver/solver.py in solve(bvp_problem, solution_guess, initial_mesh, parameter_guess, max_subintervals, singular_term, tolerance, method, trace, error_on_fail)
81 node_in = bvp_problem.num_ODE)
82
---> 83 init_solution = Solution.from_arg_list(bvp_solverf.bvp)
84
85 else:
/Users/zouzoujing/Downloads/scikits.bvp_solver-0.3.0/scikits/bvp_solver/Solution.py in from_arg_list(bvp_object)
219 # but the results end up getting screwed up when this function is called again for some other purpose
220 # this is probably because the old arrays "deallocated" by Fortran
--> 221 new = Solution(mesh = tools.fromf(bvp_object.x),
222 solution = tools.fromf(bvp_object.y),
223 parameters = tools.fromf(bvp_object.parameters),
ValueError: negative dimensions are not allowed
WARNING: Failure executing file: <../../tmp/bvp_tutorial.py>
I tried saving the tutorial code as a script file and running it, but that made no difference. Any idea?
Cheers,
Ralf