On Sunday, October 21, 2012 3:40:56 PM UTC-4, David Joyner wrote: > On Sun, Oct 21, 2012 at 3:32 PM, E. Mehmet Kıral <[email protected]> wrote: > > > Hello, > > > > > > When I write matrix(2,2,1) or matrix(QQ,3,3,1) I do not get the identitiy > > matrix. > > > > To get the 3x3 identity matrix, type > > > > identity_matrix(3) > > > > or > > > > MatrixSpace(QQ, 3, 3)(1) > > > > There are probably several other ways. Type > > > > matrix? > > > > for lots of examples. > > > > > > > > The only way the matrix function works is when I type > > > matrix() > > > and it gives me an empty matrix. > > > > > > Why is this so? Have I not installed some package correctly? Below is the > > error message that I get. > > > sage: matrix(2) > > > --------------------------------------------------------------------------- > > > AttributeError Traceback (most recent call last) > > > > > > /home/eren/sage/<ipython console> in <module>() > > > > > > /home/eren/sage/local/lib/python2.7/site-packages/sage/matrix/constructor.pyc > > in matrix(*args, **kwds) > > > 497 # check to see if the number of rows is specified > > > 498 try: > > > --> 499 import numpy > > > 500 if isinstance(args[0], numpy.ndarray): > > > 501 raise TypeError > > > > > > /home/eren/sage/local/lib/python2.7/site-packages/numpy/__init__.py in > > <module>() > > > 134 return loader(*packages, **options) > > > 135 > > > --> 136 import add_newdocs > > > 137 __all__ = ['add_newdocs'] > > > 138 > > > > > > /home/eren/sage/local/lib/python2.7/site-packages/numpy/add_newdocs.py in > > <module>() > > > 7 # core/fromnumeric.py, core/defmatrix.py up-to-date. > > > 8 > > > ----> 9 from numpy.lib import add_newdoc > > > 10 > > > 11 > > ############################################################################### > > > > > > /home/eren/sage/local/lib/python2.7/site-packages/numpy/lib/__init__.py in > > <module>() > > > 11 > > > 12 import scimath as emath > > > ---> 13 from polynomial import * > > > 14 #import convertcode > > > 15 from utils import * > > > > > > /home/eren/sage/local/lib/python2.7/site-packages/numpy/lib/polynomial.py > > in <module>() > > > 9 import re > > > 10 import warnings > > > ---> 11 import numpy.core.numeric as NX > > > 12 > > > 13 from numpy.core import isscalar, abs, finfo, atleast_1d, hstack > > > > > > AttributeError: 'module' object has no attribute 'core' > > > > > > Thank you again > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > "sage-support" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > [email protected]. > > > Visit this group at http://groups.google.com/group/sage-support?hl=en. > > > > > >
I understand that for the identity matrix there are other methods. But I do get the same error message for simply matrix(2) which according to the manual matrix?, should give me the 2by2 zero matrix. Or I get the same error when I try to construct a matrix out of vectors. This should not happen. I have my sage running in ubuntu 12.10 inside a virtual machine and I am using the version 5.3 of sage -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
