matcorr#

matcorr(first, second, remove_mean=False, method=2, weighting=None)#

Match rows of two matrices by absolute cosine correlation.

Methods are 0 (globally optimal Hungarian assignment), 1 (Vogel approximation), and 2 (successive maximum correlation). Returned row indices are zero-based. Rectangular inputs return min(rows) unique pairs.

Parameters:
  • first (Any)

  • second (Any)

  • remove_mean (bool)

  • method (int)

  • weighting (Any | None)

Return type:

tuple[ndarray, ndarray, ndarray, ndarray]