[Numpy-discussion] New function `count_unique` to generate contingency tables.

Eelco Hoogendoorn hoogendoorn.eelco at gmail.com
Tue Aug 12 12:51:10 EDT 2014

ah yes, that's also an issue I was trying to deal with. the semantics I
prefer in these type of operators, is (as a default), to have every array
be treated as a sequence of keys, so if calling unique(arr_2d), youd get
unique rows, unless you pass axis=None, in which case the array is

I also agree that the extension you propose here is useful; but ideally,
with a little more discussion on these subjects we can converge on an
even more comprehensive overhaul

On Tue, Aug 12, 2014 at 6:33 PM, Joe Kington <joferkington at gmail.com> wrote:

> On Tue, Aug 12, 2014 at 11:17 AM, Eelco Hoogendoorn <
> hoogendoorn.eelco at gmail.com> wrote:
>> Thanks. Prompted by that stackoverflow question, and similar problems I
>> had to deal with myself, I started working on a much more general extension
>> to numpy's functionality in this space. Like you noted, things get a little
>> panda-y, but I think there is a lot of panda's functionality that could or
>> should be part of the numpy core, a robust set of grouping operations in
>> particular.
>> see pastebin here:
>> http://pastebin.com/c5WLWPbp
> On a side note, this is related to a pull request of mine from awhile
> back: https://github.com/numpy/numpy/pull/3584
> There was a lot of disagreement on the mailing list about what to call a
> "unique slices along a given axis" function, so I wound up closing the pull
> request pending more discussion.
> At any rate, I think it's a useful thing to have in "base" numpy.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140812/734d9dd1/attachment.html>

More information about the NumPy-Discussion mailing list