[Numpy-discussion] A faster median (Wirth's method)

Felix Schlesinger schlesin at cshl.edu
Wed Dec 1 00:46:39 EST 2010

> > import numpy as np
> > cimport numpy as cnp
> > cdef cnp.float64_t namean(cnp.ndarray[cnp.float64_t, ndim=1] a):
> >    return np.nanmean(a)  # just a placeholder
> > is not allowed?  It works for me.  Is it a cython version thing?
> > (I've got 0.13),
> Oh, that's nice! I'm using 0.11.2. OK, time to upgrade.

Oh wow, does that mean that http://trac.cython.org/cython_trac/ticket/177
is fixed? I couldn't find anything in the release notes about that,
but it would be great news. Does the cdef function acquire and hold
the buffer?


More information about the NumPy-Discussion mailing list