Created
September 28, 2018 07:21
-
-
Save kzinmr/b938be58b9a189ce0ef4203b0637f0a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
# x: array of 1-d scalars | |
print(f'{np.mean(x):.03}, {np.std(x):.03}, {np.median(x)}') | |
plt.hist(x, bins=100) | |
plt.axvline(x.mean(), color='r') | |
plt.axvline(np.median(x), color='y') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment