def _step6(state):
 if (np.any(state.row_uncovered) and np.any(state.col_uncovered)):
  minval = np.min(state.C[state.row_uncovered], axis=0)
  minval = np.min(minval[state.col_uncovered])
  state.C[(~ state.row_uncovered)] += minval
  state.C[:, state.col_uncovered] -= minval
 return _step4

def _step6 ( state ) : if ( np . any ( state . row_uncovered ) and np . any ( state . col_uncovered ) ) : minval = np . min ( state . C [ state . row_uncovered ] , axis = 0 ) minval = np . min ( minval [ state . col_uncovered ] ) state . C [ ( ~ state . row_uncovered ) ] += minval state . C [ : , state . col_uncovered ] -= minval return _step4
add the value found in step 4 to every element of each covered row .