sudokusolver.py
def validate_sudoku(self) -> int:
        """
        Checks if sudoku array is valid, i.e. if rows, columns or boxes don't contain duplicated numbers.
        :return: 0 if array is empty, 1 if is valid, -1 if invalid
        """
        if np.count_nonzero(self.sudoku) == 0:
            return 0
        if not self.check_occurences():
            return -1
        return 1

        Checks if sudoku array is valid, i.e. if rows, columns or boxes don't contain duplicated numbers.
        :return: 0 if array is empty, 1 if is valid, -1 if invalid
        
Checks if sudoku array is valid, i.e. if rows, columns or boxes don't contain duplicated numbers.
Checks if sudoku array is valid i . e . if rows columns or boxes don ' t contain duplicated numbers .
def validate_sudoku(self) -> int:
        if np.count_nonzero(self.sudoku) == 0:
            return 0
        if not self.check_occurences():
            return -1
        return 1
def validate_sudoku ( self ) -> int : if np . count_nonzero ( self . sudoku ) == 0 : return 0 if not self . check_occurences ( ) : return - 1 return 1
Checks if sudoku array is valid, i.e.
Checks if sudoku array is valid i . e .
"""
        Checks if sudoku array is valid, i.e. if rows, columns or boxes don't contain duplicated numbers.
        :return: 0 if array is empty, 1 if is valid, -1 if invalid
        """
0 if array is empty, 1 if is valid, -1 if invalid
0 if array is empty 1 if is valid - 1 if invalid
self