Re: [Numpy-discussion] np.unique with structured arrays

2014-08-22 Thread Jaime Fernández del Río
-- > From: Jaime Fernández del Río > Sent: ‎22-‎8-‎2014 16:22 > > To: Discussion of Numerical Python > Subject: Re: [Numpy-discussion] np.unique with structured arrays > > I can confirm, the issue seems to be in sorting: > > >>> np.

Re: [Numpy-discussion] np.unique with structured arrays

2014-08-22 Thread Eelco Hoogendoorn
Oh yeah this could be. Floating point equality and bitwise equality are not the same thing. -Original Message- From: "Jaime Fernández del Río" Sent: ‎22-‎8-‎2014 16:22 To: "Discussion of Numerical Python" Subject: Re: [Numpy-discussion] np.unique with structured a

Re: [Numpy-discussion] np.unique with structured arrays

2014-08-22 Thread Eelco Hoogendoorn
umerical Python" Subject: [Numpy-discussion] np.unique with structured arrays Hello, I've found a strange behavior or I'm missing something obvious (or np.unique is not supposed to work with structured arrays). I'm trying to extract unique values from a simple stru

Re: [Numpy-discussion] np.unique with structured arrays

2014-08-22 Thread Jaime Fernández del Río
I can confirm, the issue seems to be in sorting: >>> np.sort(V_) array([([0.5, 0.0, 1.0],), ([0.5, 0.0, -1.0],), ([0.5, -0.0, 1.0],), ([0.5, -0.0, -1.0],)], dtype=[('v', ' wrote: > > Hello, > > I've found a strange behavior or I'm missing something obvious (or > np.unique is not supp

[Numpy-discussion] np.unique with structured arrays

2014-08-22 Thread Nicolas P. Rougier
Hello, I've found a strange behavior or I'm missing something obvious (or np.unique is not supposed to work with structured arrays). I'm trying to extract unique values from a simple structured array but it does not seem to work as expected. Here is a minimal script showing the problem: impor