Hello,

Need some help in searching arrays (Im new to numpy)
Is it possible to search a array, using another array considering
order/sequence? 

x = np.array([1,2,3,4,5,6], np.int32)

y = np.array([1,4,3,2,6,5], np.int32)

query= np.array([1,2,3],np.int32)

x versus query True
y versus query False


Tried with: 

np.searchsorted(x,query)  -------> array([0, 1, 2])
np.searchsorted(y,query)  -------> array([0, 1, 4])

Thanks




--
View this message in context: 
http://numpy-discussion.10968.n7.nabble.com/Array-search-considering-order-tp35911.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to