[Numpy-discussion] Array2 subset of array1

Jurgens de Bruin debruinjj at gmail.com
Tue Aug 5 08:58:38 EDT 2014


Hi,

I am new to numpy so any help would be greatly appreciated.

I have two arrays:

    array1 = np.arange(1,100+1)
    array2 = np.arange(1,50+1)

How can I calculate/determine if array2 is a subset of array1 (falls within
array 1)

Something like : array2 in array1 = TRUE for the case above.

Thank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140805/746774cc/attachment.html>


More information about the NumPy-Discussion mailing list