-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Migrated from TracdefectA clear bug or issue that prevents SciPy from being installed or used as expectedA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.stats
Description
Original ticket http://projects.scipy.org/scipy/ticket/1653 on 2012-05-02 by trac user imrisofer, assigned to unknown.
the output of scoreatprecentile changed according to the number of Not-a-Numbers in the array
#create arrays
#all of the arrays have the same precentiles
a1 = array([1,2,3,4])
a2 = array([1,2,3,4,nan])
a3 = array([1,2,3,4,nan,nan])
#put all arrays in one list
l = [a1, a2, a3]
#check precentiles of each array
for i in range(3):
print "array with %d NaNs" %(i)
print "q25: ", scoreatpercentile(l[i], 25)
print "q50: ", scoreatpercentile(l[i], 50)
print "q75: ", scoreatpercentile(l[i], 75)
print
output:
array with 0 NaNs
q25: 1.75
q50: 2.5
q75: 3.25
array with 1 NaNs
q25: 2.0
q50: 3.0
q75: 4.0
array with 2 NaNs
q25: 2.25
q50: 3.5
q75: nan
Metadata
Metadata
Assignees
Labels
Migrated from TracdefectA clear bug or issue that prevents SciPy from being installed or used as expectedA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.stats