lib.utils.match1d

lib.utils.match1d(id1, id2)

Match id2 array to id1 array.

Parameters
  • id1 (array) – IDs 1, should be unique.

  • id2 (array) – IDs 2, should be unique.

Returns

  • index1 (array) – Indices of matching id1.

  • index2 (array) – Indices of matching id2.

Warning

Makes sense only if id1 and id2 elements are unique.

References

https://www.followthesheep.com/?p=1366