Created
February 22, 2017 21:43
-
-
Save aspiringguru/4ef8001d83604fc583d09e2393a06681 to your computer and use it in GitHub Desktop.
python numpy mean being weird
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 numpy as np | |
x = [-1.58, 0.91, -0.73, -4.22, 4.19, -0.33] | |
print x | |
print np.median(x, axis=0) | |
print np.median(x) | |
print np.mean(x) | |
x = np.sort(x) | |
print x | |
print np.median(x, axis=0) | |
print np.median(x) | |
print np.mean(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment