Created
July 18, 2017 17:11
-
-
Save cavaunpeu/028f0f587fa1169360dfe697d9182875 to your computer and use it in GitHub Desktop.
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 characters
x = np.linspace(0, 100, 1) | |
def transformation(my_x): | |
results = [] | |
for x in my_x: | |
if x > 10: | |
results.append( x**2 ) | |
else: | |
results.append( x**3 ) | |
return results | |
y = transformation(x) | |
plt.plot(x, y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment