(self, other)
return (
            isinstance(other, Matrix)
            and self._nrow == other._nrow
            and self._ncol == other._ncol
            and self._data == other._data
        )
Checks whether a given matrix is equal to another one
Checks whether a given matrix is equal to another one
Checks whether a given matrix is equal to another one
def __eq__(self, other):
        """Checks whether a given matrix is equal to another one"""
        return (
            isinstance(other, Matrix)
            and self._nrow == other._nrow
            and self._ncol == other._ncol
            and self._data == other._data
        )
def __eq__ ( self , other ) : return ( isinstance ( other , Matrix ) and self . _nrow == other . _nrow and self . _ncol == other . _ncol and self . _data == other . _data )