[Numpy-discussion] unique rows of array

Maria Liukis liukis@usc....
Tue Aug 18 00:44:44 CDT 2009


On Aug 17, 2009, at 10:03 PM, josef.pktd@gmail.com wrote:

> On Tue, Aug 18, 2009 at 12:59 AM, Maria Liukis<liukis@usc.edu> wrote:
>>
>> On Aug 17, 2009, at 9:51 PM, Charles R Harris wrote:
>>
>>
>> On Mon, Aug 17, 2009 at 10:30 PM, Maria Liukis <liukis@usc.edu>  
>> wrote:
>>>
>>> Hello everybody,
>>> While re-implementing some Matlab code in Python, I've run into a  
>>> problem
>>> of finding a NumPy function analogous to the Matlab's "unique(array,
>>> 'rows')" to get unique rows of an array. Searching the web, I've  
>>> found a
>>> similar discussion from couple of years ago with an example:
>>
>> Just to be clear, do you mean finding all rows that only occur  
>> once in the
>> array?

Sorry, I think it shows that I should stop working pass 10pm :)

>>
>> Yes.
>
> I interpreted your question as removing duplicates. It keeps rows that
> occur more than once.

Yes, I meant keeping only unique (without duplicates) rows.

> That's what my example is intended to do.
>
> Josef
>
>>
>> <snip>
>>
>> Chuck
>>
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list