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

Joe Kington joferkington at gmail.com
Tue Aug 12 12:33:16 EDT 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140812/21acedc4/attachment.html>


More information about the NumPy-Discussion mailing list