[Numpy-discussion] unique along axis?

Ralf Gommers ralf.gommers at googlemail.com
Fri Mar 16 18:00:31 EDT 2012


On Mon, Mar 12, 2012 at 8:04 PM, Neal Becker <ndbecker2 at gmail.com> wrote:

> I see unique does not take an axis arg.
>
> Suggested way to apply unique to each column of a 2d array?
>

A for-loop?

I'm guessing that there isn't an axis keyword because the number of unique
elements per column may not be the same, so you can't return an ndarray.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120316/1adba99e/attachment.html>


More information about the NumPy-Discussion mailing list