<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Yes, in this case I definitely would have found in1d() if it was referenced in the where() section, either as a "see also" or even better as an example where where() is combined with np.in1d():<br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>        indexes_of_interest = np.where( np.in1d( my_records.integer_field, my_values_of_interest ) )<br><br>I think the where() documentation page must be a place where a lot of people/newbies spend a lot of time. Perhaps like me they are focusing on the solution being "where() + some python stuff I already know", instead of thinking of other numpy functions, like in1d(), that might come into play.<br><br>It makes sense that in1d() is under the "Set" section. However (just to try to explain further why I
 didn't look and find it there), somehow I think of "set" when I am focused on having a list without duplicates. In my case I wasn't worried about duplicates, just about "I want all the guys that match any of these other guys". I did google for "numpy member", "numpy membership", "numpy in", but none led me to in1d().<br><br>Also, it's worth saying that, as a newcomer to numpy and relative newcomer to python, I often think that what I'm looking for isn't going to end up being a function with a name -- often some use of slices or (fancy) indexing, or some other "pure syntax" mechanism, ends up doing what you want. So that's one reason I didn't simply scan all the available numpy function names.<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Neil Crighton <neilcrighton@gmail.com><br><b><span style="font-weight:
 bold;">To:</span></b> numpy-discussion@scipy.org<br><b><span style="font-weight: bold;">Sent:</span></b> Sun, May 29, 2011 10:03:25 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Numpy-discussion] finding elements that match any in a set<br></font><br>
Michael Katz <michaeladamkatz <at> <a target="_blank" href="http://yahoo.com">yahoo.com</a>> writes:<br><br>> Yes, thanks, np.in1d is what I needed. I didn't know how to find that.<br><br>Did you check in the documentation? If so, where did you check? Would you have<br>found it if it was in the 'See also' section of where()?<br><br><span>(<a target="_blank" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.where.html">http://docs.scipy.org/doc/numpy/reference/generated/numpy.where.html</a>)</span><br><br>I ask because people often post to the list needing in1d() after not being <br>able to find it via the docs, so it would be nice to add references in<br>the places people go looking for it.<br><br>Neil<br><br><br>_______________________________________________<br>NumPy-Discussion mailing list<br><a ymailto="mailto:NumPy-Discussion@scipy.org" href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br><span><a
 target="_blank" href="http://mail.scipy.org/mailman/listinfo/numpy-discussion">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a></span><br></div></div>
</div></body></html>