notebook2.ipynb
176 lines
| 9.8 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 cell that has both text and PNG output:
In [14]:
hist(evs.real)
Out[14]:
In [ ]: