python - How to create a histogram of 2D arrays in ipython -


i have use random number generator create 1000*1000 2d arrays. how can create histogram of 2d arrays?

s1=np.random.rand(1000,1000) 

install , use matplotlib. code this:

import matplotlib.pyplot plt  s1=np.random.rand(1000,1000) plt.hist(s1) 

matplotlib gives ton of useful options, can read more them here.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -