Skip to content

Instantly share code, notes, and snippets.

@gerritjvv
Created January 28, 2021 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerritjvv/022c7519deccaf6385b4e3866545f312 to your computer and use it in GitHub Desktop.
Save gerritjvv/022c7519deccaf6385b4e3866545f312 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# pip3 install matplotlib
# pip3 install numpy
import matplotlib.pyplot as plt
import numpy as np
import sys
file = sys.argv[1]
with open(file, 'rb') as io:
x = np.load(io)
# take a shape of (rows, columns)
# and make 1 row and N columns appending each row's columns
x_hist = np.squeeze(x.reshape(1,-1))
plt.hist(x, bins=50)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment