pypet/parameter.py
def _equal_values(self, val1, val2):
        """Matrices are equal if they hash to the same value."""
        if self._is_supported_matrix(val1):
            if self._is_supported_matrix(val2):

                _, _, hash_tuple_1 = self._serialize_matrix(val1)
                _, _, hash_tuple_2 = self._serialize_matrix(val2)

                return hash(hash_tuple_1) == hash(hash_tuple_2)
            else:
                return False
        else:
            return super(SparseParameter, self)._equal_values(val1, val2)
def _equal_values(self, val1, val2):
        if self._is_supported_matrix(val1):
            if self._is_supported_matrix(val2):

                _, _, hash_tuple_1 = self._serialize_matrix(val1)
                _, _, hash_tuple_2 = self._serialize_matrix(val2)

                return hash(hash_tuple_1) == hash(hash_tuple_2)
            else:
                return False
        else:
            return super(SparseParameter, self)._equal_values(val1, val2)
def _equal_values ( self , val1 , val2 ) : if self . _is_supported_matrix ( val1 ) : if self . _is_supported_matrix ( val2 ) : _ , _ , hash_tuple_1 = self . _serialize_matrix ( val1 ) _ , _ , hash_tuple_2 = self . _serialize_matrix ( val2 ) return hash ( hash_tuple_1 ) == hash ( hash_tuple_2 ) else : return False else : return super ( SparseParameter , self ) . _equal_values ( val1 , val2 )
Matrices are equal if they hash to the same value.
Matrices are equal if they hash to the same value .