hungarian#

hungarian(cost_matrix)#

Return a 1-based column-to-row assignment and its total cost.

assignment[j] is the 1-based row assigned to column j + 1.

Parameters:

cost_matrix (Any)

Return type:

tuple[ndarray, float]