[Numpy-discussion] Comparison of arrays

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Feb 9 02:34:11 CST 2009


Hi all,

I have two integer arrays of different shape, e.g.

   
>>> a
array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10])
>>> b
array([ 3,  4,  5,  6,  7,  8,  9, 10])

How can I extract the values that belong to the array a 
exclusively i.e. array([1,2]) ?

Nils


More information about the Numpy-discussion mailing list