parameters: (state)
return_statement: return _step3
docstring: Steps 1 and 2 in the Wikipedia page.
docstring_summary: Steps 1 and 2 in the Wikipedia page.
docstring_tokens: Steps 1 and 2 in the Wikipedia page .
function: def _step1(state):
      """Steps 1 and 2 in the Wikipedia page."""
  
      # Step 1: For each row of the matrix, find the smallest element and
      # subtract it from every element in its row.
      state.C -= state.C.min(axis=1)[:, np.newaxis]
      # Step 2: Find a zero (Z) in the resulting matrix. If there is no
      # starred zero in its row or column, star Z. Repeat for each element
      # in the matrix.
      for i, j in zip(*np.where(state.C == 0)):
          if state.col_uncovered[j] and state.row_uncovered[i]:
              state.marked[i, j] = 1
              state.col_uncovered[j] = False
              state.row_uncovered[i] = False
  
      state._clear_covers()
      return _step3
function_tokens: def _step1 ( state ) : # Step 1: For each row of the matrix, find the smallest element and # subtract it from every element in its row. state . C -= state . C . min ( axis = 1 ) [ : , np . newaxis ] # Step 2: Find a zero (Z) in the resulting matrix. If there is no # starred zero in its row or column, star Z. Repeat for each element # in the matrix. for i , j in zip ( * np . where ( state . C == 0 ) ) : if state . col_uncovered [ j ] and state . row_uncovered [ i ] : state . marked [ i , j ] = 1 state . col_uncovered [ j ] = False state . row_uncovered [ i ] = False state . _clear_covers ( ) return _step3