Skip to content

Instantly share code, notes, and snippets.

@kzinmr
Created September 28, 2018 07:21
Show Gist options
  • Save kzinmr/b938be58b9a189ce0ef4203b0637f0a0 to your computer and use it in GitHub Desktop.
Save kzinmr/b938be58b9a189ce0ef4203b0637f0a0 to your computer and use it in GitHub Desktop.
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