Feature Request: Return indices of elements from intersection
I love the idea of taking advantage of pre-sorted numpy arrays, and this seems like a great package. Would it be possible to add a feature to the intersect function such that the user can obtain not only the intersection of the two arrays, but the indices of the elements in the original arrays which are part of the intersection? For example, the following command:
a = np.array([2,4,6,8,10])
b = np.array([1,2,3,4])
intersection, indices = snp.intersect(a,b)
would result in the following arrays:
intersection == array([2,4])
indices == (array([0,1]), array([1,3]))
Would this be feasible to implement?
Edited by jtrunnels91