notebook2.ipynb
187 lines
| 10.1 KiB
| text/plain
|
TextLexer
NumPy and Matplotlib examples¶
First import NumPy and Matplotlib:
In [1]:
%pylab inline
In [2]:
import numpy as np
Now we show some very basic examples of how they can be used.
In [6]:
a = np.random.uniform(size=(100,100))
In [7]:
a.shape
Out[7]:
In [8]:
evs = np.linalg.eigvals(a)
In [10]:
evs.shape
Out[10]:
Here is a very long heading that pandoc will wrap and wrap and wrap and wrap and wrap and wrap and wrap and wrap and wrap and wrap and wrap and wrap¶
Here is a cell that has both text and PNG output:
In [14]:
hist(evs.real)
Out[14]:
def foo(bar=1):
"""docstring"""
raise Exception("message")