[SciPy-dev] percentileofscore in svn

josef.pktd@gmai... josef.pktd@gmai...
Sat Nov 22 11:32:47 CST 2008


On Sat, Nov 22, 2008 at 11:55 AM, Ariel Rokem <arokem@berkeley.edu> wrote:
> Hi Josef - cool reworking of the function. I am not quite following - what
> do you mean "handle a vector of scores at the same
> time"?
>
> Ariel

evaluate for several scores at the same time:
a = [1,2,3,4,5,6,7,8,9,10]
percentileofscore(a,[4,5,8])
or
percentileofscore(a,np.array([4,5,8]))
instead of
for s in [4,5,8]:
    percentileofscore(a,s)

For example if "a" are the student grades, then
percentileofscore(a,a)
would give you the ranking of every student.

percentileofscore(a,[4,5,8], kind = 'weak') would provide empirical
cumulative frequency for 4,5,8

But I didn't see a way of gaining much in the function compared to the
simple for loop.

Josef


More information about the Scipy-dev mailing list