[Numpy-discussion] interesect1d bug?

Alan G Isaac aisaac@american....
Thu Sep 20 15:55:10 CDT 2007


On Thu, 20 Sep 2007, Tom Denniston apparently wrote:
> Is this the expected behavior of the numpy.intersect1d funciton: 
> In [8]: numpy.intersect1d([3766, 9583, 17220, 40048, 50909, 52241, 
> 62494, 828525, 20548728, 14874, 320256, 12795, 2223137, 16554, 27901, 
> 2031774, 13610, 1592688, 13585, 16205, 1181652, 37177, 828525, 52241, 
> 113826, 285236, 19475, 933518, 3114301, 38132], [35971, 28972, 4126, 
> 212327])
> Out[8]: array([ 52241, 828525])

There are duplicates in your first array.
(See the docs.)

hth,
Alan Isaac





More information about the Numpy-discussion mailing list