Permalink
Browse files

Update immutablematrix.__setitem__ error message

Now points user to use the Matrix class for this case.
  • Loading branch information...
1 parent 98a3f3f commit a2c5418a8d79f5f99e87534db4820c95c10feb5e @mrocklin mrocklin committed Sep 7, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 doc/src/modules/matrices/immutablematrices.rst
  2. +2 −1 sympy/matrices/immutable_matrix.py
View
2 doc/src/modules/matrices/immutablematrices.rst
@@ -27,7 +27,7 @@ the constructor
>>> IM[1, 1] = 5
Traceback (most recent call last):
...
- TypeError: Can not set values in Immutable Matrix
+ TypeError: Can not set values in Immutable Matrix. Use Matrix instead.
Matrix Expressions
------------------
View
3 sympy/matrices/immutable_matrix.py
@@ -30,7 +30,8 @@ def _entry(self, i, j):
return MatrixBase.__getitem__(self, (i,j))
def __setitem__(self, *args):
- raise TypeError("Can not set values in Immutable Matrix")
+ raise TypeError("Can not set values in Immutable Matrix. "
+ "Use Matrix instead.")
__getitem__ = MatrixBase.__getitem__

0 comments on commit a2c5418

Please sign in to comment.