old_version/solver.py
def check_if_one_occurence_of_digit(self, elements_list: List[SudokuElement]) -> bool:
        """
        Checks if row, column or square contains only one of non-zero digits.
        :param elements_list: list of rows, columns or squares
        :return: bool
        """
        for element in elements_list:
            array = self.s.array[element.row_start:element.row_stop, element.column_start:element.column_stop]
            digits = [i for i in np.unique(array) if i > 0]
            for digit in digits:
                if np.count_nonzero(array == digit) > 1:
                    return False
        return True

        Checks if row, column or square contains only one of non-zero digits.
        :param elements_list: list of rows, columns or squares
        :return: bool
        
Checks if row, column or square contains only one of non-zero digits.
Checks if row column or square contains only one of non - zero digits .
def check_if_one_occurence_of_digit(self, elements_list: List[SudokuElement]) -> bool:
        for element in elements_list:
            array = self.s.array[element.row_start:element.row_stop, element.column_start:element.column_stop]
            digits = [i for i in np.unique(array) if i > 0]
            for digit in digits:
                if np.count_nonzero(array == digit) > 1:
                    return False
        return True
def check_if_one_occurence_of_digit ( self , elements_list : List [ SudokuElement ] ) -> bool : for element in elements_list : array = self . s . array [ element . row_start : element . row_stop , element . column_start : element . column_stop ] digits = [ i for i in np . unique ( array ) if i > 0 ] for digit in digits : if np . count_nonzero ( array == digit ) > 1 : return False return True
Checks if row, column or square contains only one of non-zero digits.
Checks if row column or square contains only one of non - zero digits .
"""
        Checks if row, column or square contains only one of non-zero digits.
        :param elements_list: list of rows, columns or squares
        :return: bool
        """
None
self
elements_list
List[SudokuElement]
list of rows, columns or squares
list of rows columns or squares