21/09/10 @ 12:55 (-0500), thus spake Gökhan Sever:
> On Tue, Sep 21, 2010 at 12:43 PM, wrote:
>
> > I'm a bit surprised, I think np.unique does some extra work to
> > maintain the order.
> > The tolist() might not be necessary if you iterate over rows.
> >
>
> Testing again with a smaller k arra
On Tue, Sep 21, 2010 at 12:43 PM, wrote:
> I'm a bit surprised, I think np.unique does some extra work to
> maintain the order.
> The tolist() might not be necessary if you iterate over rows.
>
Testing again with a smaller k array and more repeats
I[25]: k = np.array((a.tolist()*5000))
I[27]:
On Tue, Sep 21, 2010 at 1:29 PM, Gökhan Sever wrote:
>
>
> On Tue, Sep 21, 2010 at 1:55 AM, Peter Schmidtke
> wrote:
>>
>> Dear all,
>>
>> I'd like to know if there is a pythonic / numpy way of retrieving unique
>> lines of a 2d numpy array.
>>
>> In a way I have this :
>>
>> [[409 152]
>> [409
On Tue, Sep 21, 2010 at 1:55 AM, Peter Schmidtke
wrote:
> Dear all,
>
> I'd like to know if there is a pythonic / numpy way of retrieving unique
> lines of a 2d numpy array.
>
> In a way I have this :
>
> [[409 152]
> [409 152]
> [409 152]
> [409 152]
> [409 152]
> [409 152]
> [409 152]
> [
Hey Josef,
I didn't stumble upon these posts. Thanks for the hint...it doesn't look
very pythonic or matlab like still. This would be a nice thing to have a
unique function that is able to take an axis argument.
Cheers.
Peter
josef.p...@gmail.com wrote:
> On Tue, Sep 21, 2010 at 2:55 AM, Peter
On Tue, Sep 21, 2010 at 2:55 AM, Peter Schmidtke
wrote:
> Dear all,
>
> I'd like to know if there is a pythonic / numpy way of retrieving unique
> lines of a 2d numpy array.
>
> In a way I have this :
>
> [[409 152]
> [409 152]
> [409 152]
> [409 152]
> [409 152]
> [409 152]
> [409 152]
> [
Dear all,
I'd like to know if there is a pythonic / numpy way of retrieving unique
lines of a 2d numpy array.
In a way I have this :
[[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[426 193]
[431 129]]
And I'd like to ge