Assuming the matrix has the expected shape it would work directly:
a = np.random.randn(10, 10)
plt.imshow(a)

However, as your error message points out you are using an object dtype, so you are most likely mixing different arrays into one. Search for this error message and you should be able to find more explanations of this issue.