On Mon, Mar 24, 2014 at 11:57 AM, Alan G Isaac <[email protected]> wrote:
> On 3/24/2014 1:41 PM, Charles R Harris wrote: > > For float types you would need to use the negative. > > > Yes, that's all I could come up with. > So ... shd `sort` have a `reverse` option, > like Python's builtin? > > Well, it would double the number of sorts if we kept them efficient with efficient type specific compares. Alternatively, we could sort the reverse option using less efficient compare function calls. I think whether or not we add a reverse option should depend on how many want it. One potential problem would be that the sort function pointers are built into PyArray_ArrFuncs, and adding more might be problematic. That has been a continuing source of pain, for instance in adding the partition and binsearch functions, so it might be worth just expanding that structure. Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
