In following the official tutorial, I ran a command "A = matrix(4,4, range(
16))" to get the error below.  It looks like importing numpy imports 
something in numpy to create a loop.  How can I create a matrix?

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-16-644ea671373e> in <module>()
----> 1 A = matrix(Integer(4),Integer(4), range(Integer(16)))

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/sage/matrix/constructor.pyc
 
in _matrix_constructor(*args, **kwds)
    558         # check to see if the number of rows is specified
    559         try:
--> 560             import numpy
    561             if isinstance(args[0], numpy.ndarray):
    562                 raise TypeError

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/numpy/__init__.py
 
in <module>()
    135         return loader(*packages, **options)
    136 
--> 137     import add_newdocs
    138     __all__ = ['add_newdocs']
    139 

/usr/local/sage-6.1.1-x86_64-Linux/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 
###############################################################################

/usr/local/sage-6.1.1-x86_64-Linux/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 *

/usr/local/sage-6.1.1-x86_64-Linux/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, dot

AttributeError: 'module' object has no attribute 'core'
sage: 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to