[SciPy-user] intersect (matlab)

Bernardo M. Rocha bernardo.rocha@meduni-graz...
Mon Feb 16 00:53:40 CST 2009


Hi Robert Kern,

I have 2 matrices of dimensions npts1 x 3 and npts2 x 3, and I would 
like to figure out the intersection between the rows of these matrices. 
If you think that the matrices are lists of points with their 
coordinates, I want to find out the common points to both lists. That's 
it. In matlab you can simply do:

[c,iai,ib] = intersect(A,B,'rows')

But the intersect in python only works with 1D arrays.

Best regards,
Bernardo M. Rocha






More information about the SciPy-user mailing list