"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mpmath/matrices/matrices.py" between
mpmath-1.0.0.tar.gz and mpmath-1.1.0.tar.gz

About: mpmath is a Python library for arbitrary-precision floating-point arithmetic.

matrices.py  (mpmath-1.0.0):matrices.py  (mpmath-1.1.0)
skipping to change at line 660 skipping to change at line 660
for j in xrange(self.__cols): for j in xrange(self.__cols):
new[i,j] += self[i,j] + other new[i,j] += self[i,j] + other
return new return new
def __radd__(self, other): def __radd__(self, other):
return self.__add__(other) return self.__add__(other)
def __sub__(self, other): def __sub__(self, other):
if isinstance(other, self.ctx.matrix) and not (self.__rows == other.__ro ws if isinstance(other, self.ctx.matrix) and not (self.__rows == other.__ro ws
and self.__cols == other.__cols): and self.__cols == other.__cols):
raise ValueError('incompatible dimensions for substraction') raise ValueError('incompatible dimensions for subtraction')
return self.__add__(other * (-1)) return self.__add__(other * (-1))
def __neg__(self): def __neg__(self):
return (-1) * self return (-1) * self
def __rsub__(self, other): def __rsub__(self, other):
return -self + other return -self + other
def __eq__(self, other): def __eq__(self, other):
return self.__rows == other.__rows and self.__cols == other.__cols \ return self.__rows == other.__rows and self.__cols == other.__cols \
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)