matplotlib


In [1]:
import matplotlib.pyplot as plt

N = 6
X = np.randn(N * N) * 0.1


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-8278630a9c50> in <module>()
      2 
      3 N = 6
----> 4 X = np.randn(N * N) * 0.1

NameError: name 'np' is not defined

plot grid


In [8]:
import matplotlib.pyplot as plt
import numpy as np


A = np.random.randn(4, 3).astype(np.float32)
plt.pcolor(A, cmap=plt.get_cmap('gray'))
plt.colorbar()
plt.show()