Hello everyone,
My desired result and probably the context of the problem to
understand it better:
-> Well, I'd like to load some previously saved symbolic matrices.
There are several of then and they are time consuming to compute. So
ideally I'd like to just load them every time instead of computing
them from scratch.
My platform and operating system:
-> Ubuntu 10.04 virtual machine , windows host, virtualbox version 4.0
which version of Sage you use (command: "version()" in Sage)
-> Sage 4.6
how you have acquired Sage (binary build, compiled from source, ...)
compiled from source
and if applicable, include reproducible commands which cause the
error, along with possible error messages.
-> Sure, here is a toy version of my problem that I just ran in sage's
command line:
example:
alpha, beta, delta = var('alpha, beta, delta')
foomat = matrix([[alpha, beta],[delta,alpha]])
save(foomat,'foomat')
load(foomat,'foomat')
error message:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
/home/ricardo/sage-4.6/<ipython console> in <module>()
/home/ricardo/sage-4.6/local/lib/python2.6/site-packages/sage/
structure/sage_object.so in sage.structure.sage_object.load (sage/
structure/sage_object.c:7033)()
/home/ricardo/sage-4.6/local/lib/python2.6/site-packages/sage/
structure/sage_object.so in sage.structure.sage_object.load (sage/
structure/sage_object.c:7188)()
/home/ricardo/sage-4.6/local/lib/python2.6/site-packages/sage/misc/
preparser.pyc in is_loadable_filename(filename)
1386 # Loop over list of supported code file extensions for the
load function.
1387 for ext in ['.py', '.pyx', '.sage', '.spyx']:
-> 1388 if filename.endswith(ext):
1389 return True
1390 return False
/home/ricardo/sage-4.6/local/lib/python2.6/site-packages/sage/
structure/element.so in sage.structure.element.Element.__getattr__
(sage/structure/element.c:2666)()
/home/ricardo/sage-4.6/local/lib/python2.6/site-packages/sage/
structure/parent.so in sage.structure.parent.getattr_from_other_class
(sage/structure/parent.c:2840)()
/home/ricardo/sage-4.6/local/lib/python2.6/site-packages/sage/
structure/parent.so in sage.structure.parent.raise_attribute_error
(sage/structure/parent.c:2611)()
AttributeError:
'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense' object has
no attribute 'endswith'
Question: Is this a bug? Is there a workaround? I did a bit of search
before sending this post, but couldn't find this same problem.
I'm fairly new to both Sage and Python. Sage reference manual says
that Matrix symbolic class are basically points to a Maxima object ...
so maybe this is a bug inside Maxima and not in Sage proper, but I
would not know.
Thanks in advance for your comments and help
best,
Ricardo
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org