First things first: how do I get some help?
?
%quickref
%magic
%alias?
!pwd
Tab completion!
import numpy as np
np
2+3
_ **2
2**100
def factorial(n):
if n==0:
return 1
return n*factorial(n-1)
factorial(10)
import this
This imports numpy as np
and matplotlib's plotting routines as plt
, plus setting lots of other stuff for you to work interactivel very easily:
%pylab inline
x = np.linspace(0, np.pi, 200)
y = np.sin(x**2)
plt.plot(x, y)