pygeon.utils.set_membership module

Set membership utilities.

pygeon.utils.set_membership.match_coordinates(a, b)[source]

Compare and match columns of a and b. We assume that each column has a match. NOTE: This code is not optimized so only use this for “small” matrices.

Parameters:
  • a (np.array, m x n) – The first matrix to compare.

  • b (np.array, m x n) – The second matrix to compare.

Returns:

The indices ind such that b[:, ind] = a.

Return type:

np.array, (n, )