summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorChristopher <cjp.agostino@gmail.com>2018-05-25 19:25:20 -0400
committerCharles Harris <charlesr.harris@gmail.com>2018-05-25 17:25:20 -0600
commit0bd86db79b7a8000f9dbd401df722ffae9c2b33c (patch)
tree2cf44e0dda4c2c0d0cf902f69137133392aeda22 /numpy/lib/tests/test_index_tricks.py
parent0dfb8f06fc9f80f1618624f9bbf7565adf735235 (diff)
downloadnumpy-0bd86db79b7a8000f9dbd401df722ffae9c2b33c.tar.gz
ENH: Modify intersect1d to return common indices (#10684)
* added function commonpts1d * Update arraysetops.py * Update arraysetops.py * modified intersect1d to return common indices Proposed this idea in previous pull request (https://github.com/numpy/numpy/pull/10683) and made suggested changes for implementing this idea to have relevant common indices that correspond to the values in the intersection of the two arrays. * update intersect1d with suggested changes * implemented return_indices options for intersect1d I've tested out the above code and for the ~10 different test sets I've tried it's worked thus far. It's probably not the cleanest implementation but it works and is vectorized. * cleaned up structure for intersect1d * fixed copy-paste error, added second test, changed a conditional * Testing return_indices in intersect1d * formatting * created separate test function for intersect1d indices, added spaces after commas * fixed up example and some style * fixed style * style change * removed one example * removed extra space * added version number for return_indices * added 'return_indices' keyword for np.intersect1d * fixed formatting * updated return_indices entry * fixed some typos and style * added bit about first instance of a value being used * STY: Fix comment formats * DOC: missing space * DOC: correct parameter names in docstring * made suggested changes * fixed a mistake from previous update also added documentation for comm1, comm2 to match doc from np.unique * added in tests for 2d inputs * STY: Add missing spaces around commas * TST: Correct array to actually be unique * STY: Spaces at beginning of comments
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
0 files changed, 0 insertions, 0 deletions