jkitchin / pycse

Python computations in science and engineering
GNU General Public License v2.0
242 stars 67 forks source link

bvp_L0 issue in pycse #23

Closed yangsungwoo closed 5 years ago

yangsungwoo commented 6 years ago

Dear Dr. Kitchin,

When I tried to use "bvp_L0", it gives me an error below. This is the code you wrote in your PYCSE, and which I tried. I have successfully install pycse via pip. Any help will be very appreciable.


ImportError Traceback (most recent call last)

in () ----> 1 from pycse import bvp_L0 2 3 # we use the notation for y'' = p(x)y' + q(x)y + r(x) 4 def p(x): return 0 5 def q(x): return 0 ImportError: cannot import name 'bvp_L0' `from pycse import bvp_L0 def p(x): return 0 def q(x): return 0 def r(x): return 0 x1 = 0; alpha = 100 x2 = 1; beta = 200 npoints = 100 x, y = bvp_L0(p, q, r, x1, x2, alpha, beta, npoints=100) print(len(x)) import matplotlib.pyplot as plt plt.plot(x, y) plt.xlabel('X') plt.ylabel('T') plt.savefig('images/ht-example.png')`
jkitchin commented 6 years ago

Try:

from pycse.PYCSE import bvp_L0

instead.

yangsungwoo commented 6 years ago

Works great. Thank you so much for your help. I really appreciate your timely response.