Hello, I have a strange problem with a piece of code I've written. It's a bit overly complicated to make an example with, but the gist is below. But in the example below, it works. However, in my example, when I call the method from within the function, it returns something other than what I expect. If I call the method outside the function, it behaves properly???
class DataHolder(): def __init__(self): self.x = np.arange(100) def f(self,wl): f = np.sin(self.x) ** wl return f def function(DH,wl=20): f = DH.f(wl) plt.plot(DH.x,f) _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor