The good news is that it was trivial to adapt numpy/core/src/_sortmodule.c.src:quicksort() to do a quickselect(). When I'm back home I'll follow up with discussion on how (if it all) to expose this to numpy.median() or numpy in general. -Chad