[SciPy-user] intersect (matlab)
Robert Cimrman
cimrman3 at ntc.zcu.cz
Mon Feb 16 07:07:53 EST 2009
Bernardo M. Rocha wrote:
> 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
These questions appear from time to time - it would be nice to add more
kwarg options to all the functions in the arraysetops module, like
return_index, rows (or better, axis!), etc. Unfortunately, I (the
culprit of arraysetops) am too swamped by work to look at it right now.
But it's on my TODO list.
Best regards,
r.
More information about the SciPy-User
mailing list