On Thu, Sep 24, 2009 at 10:51 PM, Kwankyu <ekwan...@gmail.com> wrote:
>
> Hi,
>
> I am modifying the file sage/rings/polynomial/term_order.py. If I add
> the following line
>
> import sage.matrix.matrix
>
> Then Sage is compiled but Sage does not run but issue the following
> error:
> ...
> ...
> ...
> /Users/Kwankyu/Sage/local/lib/python2.6/site-packages/sage/matrix/
> matrix_space.py in <module>()
>     32 # Sage matrix imports
>
>     33 import matrix
> ---> 34 import matrix_generic_dense
>     35 import matrix_generic_sparse
>     36
>
> /Users/Kwankyu/Sage/local/bin/matrix_generic_dense.pyx in
> sage.matrix.matrix_generic_dense (sage/matrix/matrix_generic_dense.c:
> 3790)()
>
> /Users/Kwankyu/Sage/local/bin/matrix_dense.pyx in
> sage.matrix.matrix_dense (sage/matrix/matrix_dense.c:4981)()
>
> AttributeError: 'module' object has no attribute 'Matrix'
> Error importing ipy_profile_sage - perhaps you should run %upgrade?
> WARNING: Loading of ipy_profile_sage failed.
>
>
> What am I doing wrong? Am I doing a circular import?

Yes.

> What I want to do actually is to use the method
> sage.matrix.matrix.is_Matrix().
>
> This is perhaps a novice's question... Thank you in advance.

It's not a novice question.

Try putting " import sage.matrix.matrix" as the line *right* before
you use "sage.matrix.matrix.is_Matrix()".  I.e., do the import in the
function, not at the module level.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to