python - TypeError: 'float' object is not callable -
i getting "typeerror: 'float' object not callable.
here code:
from matplotlib.pylab import * def f(x,t): return (exp(-(x-3*t)**2) )*sin(3*pi(x-t)) x = linspace(-4, 4, 8) y = zeros(len(x)) in xrange(len(x)): y[i] = f(x[i],0) plot(x, y) show()
pi isn't function, since didn't use * indicate want multiply it, looks using one.
Comments
Post a Comment