[SciPy-dev] percentileofscore in svn
Sat Nov 22 13:50:16 CST 2008
On Sat, Nov 22, 2008 at 12:32 PM, <email@example.com> wrote:
> evaluate for several scores at the same time:
> a = [1,2,3,4,5,6,7,8,9,10]
> instead of
> for s in [4,5,8]:
> For example if "a" are the student grades, then
> 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.
Is there a reason why you couldn't implement percentileofscore() with
numpy's searchsorted()? That would give you vectorization and more
efficiently handle large #s of bins.
Nathan Bell firstname.lastname@example.org
More information about the Scipy-dev