[SciPy-user] remove duplicate points...

Pierre GM pgmdevlist@gmail....
Wed Apr 23 11:44:20 CDT 2008

On Wednesday 23 April 2008 12:32:48 Emanuele Olivetti wrote:
> Pierre GM wrote:
> Very interesting solution. Could you explain line 2:
> """ zr=z.view([('a',int),('b',int)]) """
> in more detail? I understand you shrink 2 values in 1 single object
> but I don't understand the syntax.

With that line, you get a view of the ndarray z as a record array, each record 
consisting of two integer fields named a and b.
The names don't matter, actually, they're just placeholders in our case. As 
you have a nx4 array, each record (viz, set of coordinates) should have 4 
fields (x,y,z,value, for example), so use somethng like 

More information about the SciPy-user mailing list