A demo of some very basic features of Jupyter notebooks.
Author: Lehman Garrison (lgarrison@cfa.harvard.edu)
Made for the CfA Jupyter Workshop at Wolbach Library, 12/7/2016
In [1]:
print 'hello world!'
In [2]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
In [7]:
x = np.linspace(0,10,1000)
y = np.sin(x)
The following is a plot of $f(x) = \sin(x)$:
In [8]:
plt.plot(x,y)
Out[8]:
In [24]:
%timeit np.random.rand(100000)
In [25]:
%%timeit
a = np.random.rand(100000)
b = np.fft.fft(a)