Last active
December 17, 2015 00:38
-
-
Save tfiers/5522095 to your computer and use it in GitHub Desktop.
Revisions
-
tfiers revised this gist
May 7, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,5 +10,5 @@ def f(self, x=10): from pylab import * t = arange(-1E2, 8E2, .1) s = map(B().f, t) plot(t, s, 'r.') # Plot t versus s as red dots. show() -
tfiers created this gist
May 5, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ class A: def f(self, x): return self.f(x/2) + 1 class B(A): def f(self, x=10): if x < 0: return self.f(x+200) + 2 if x > 20: return A.f(self,x-50) + 3 else: return x from pylab import * t = arange(-1E2, 8E2, .1) s = map(B().f, t) plot(t, s, 'r.') # Plot t versus s als rode punten. show()