Hi!
I'm Linux Mint 17.1 user. I have Sage 6.4.1 and Maple 18 installed. I'm
facing very strange error using sage interface to maple when I use sqrt
function in sage side. Look at example:
sage: a,b,c,d = var('a b c d')
sage: M = matrix([[a,b],[c,sqrt(d)]])
sage: maple('LinearAlgebra[Determinant]')(M).sage()
It causes error (full stack trace in attachment):
TypeError: An error occurred running a Maple command:
INPUT:
sage14:=Matrix(2,2,[[a, b], [c, sqrt[d]]]):;
OUTPUT:
Error, module does not export `d`
Any clues? Any ideas?
Best regards
Paweł Bogdan
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
sage: a,b,c,d = var('a b c d')
sage: M = matrix([[a,b],[c,sqrt(d)]])
sage: maple('LinearAlgebra[Determinant]')(M).sage()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-19-c6a1b171e444> in <module>()
----> 1 maple('LinearAlgebra[Determinant]')(M).sage()
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in __call__(self, *args)
671 self._check_valid()
672 P = self.parent()
--> 673 return getattr(P, self.name())(*args)
674
675 def __contains__(self, x):
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in __call__(self, *args, **kwds)
561
562 def __call__(self, *args, **kwds):
--> 563 return self._parent.function_call(self._name, list(args), kwds)
564
565 def _sage_doc_(self):
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in function_call(self, function, args, kwds)
482 [0.5,5.5511151231257...e-15,21,0]
483 """
--> 484 args, kwds = self._convert_args_kwds(args, kwds)
485 self._check_valid_function_name(function)
486 s = self._function_call_string(function,
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in _convert_args_kwds(self, args, kwds)
443 for i, arg in enumerate(args):
444 if not isinstance(arg, InterfaceElement) or arg.parent() is
not self:
--> 445 args[i] = self(arg)
446 for key, value in kwds.iteritems():
447 if not isinstance(value, InterfaceElement) or
value.parent() is not self:
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in __call__(self, x, name)
199 return cls(self, x, name=name)
200 try:
--> 201 return self._coerce_from_special_method(x)
202 except TypeError:
203 raise
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in _coerce_from_special_method(self, x)
225 s = '_gp_'
226 try:
--> 227 return (x.__getattribute__(s))(self)
228 except AttributeError:
229 return self(x._interface_init_())
/usr/local/sage/local/lib/python2.7/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._maple_
(build/cythonized/sage/structure/sage_object.c:8374)()
/usr/local/sage/local/lib/python2.7/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._interface_
(build/cythonized/sage/structure/sage_object.c:5117)()
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in __call__(self, x, name)
197
198 if isinstance(x, basestring):
--> 199 return cls(self, x, name=name)
200 try:
201 return self._coerce_from_special_method(x)
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in
__init__(self, parent, value, is_name, name)
1304 else:
1305 try:
-> 1306 self._name = parent._create(value, name=name)
1307 # Convert ValueError and RuntimeError to TypeError for
1308 # coercion to work properly.
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in _create(self, value, name)
387 def _create(self, value, name=None):
388 name = self._next_var_name() if name is None else name
--> 389 self.set(name, value)
390 return name
391
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/maple.pyc in
set(self, var, value)
616 """
617 cmd = '%s:=%s:' % (var, value)
--> 618 out = self.eval(cmd)
619 if out.find("error") != -1:
620 raise TypeError("Error executing code in
Maple\nCODE:\n\t%s\nMaple ERROR:\n\t%s" % (cmd, out))
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in
eval(self, code, strip, synchronize, locals, allow_use_file, split_lines,
**kwds)
1221 elif split_lines:
1222 return '\n'.join([self._eval_line(L,
allow_use_file=allow_use_file, **kwds)
-> 1223 for L in code.split('\n') if L
!= ''])
1224 else:
1225 return self._eval_line(code,
allow_use_file=allow_use_file, **kwds)
/usr/local/sage/local/lib/python2.7/site-packages/sage/interfaces/maple.pyc in
_eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
570
wait_for_prompt=wait_for_prompt).replace('\\\n','').strip()
571 if z.lower().find("error") != -1:
--> 572 raise RuntimeError("An error occurred running a Maple
command:\nINPUT:\n%s\nOUTPUT:\n%s" % (line, z))
573 return z
574
TypeError: An error occurred running a Maple command:
INPUT:
sage14:=Matrix(2,2,[[a, b], [c, sqrt[d]]]):;
OUTPUT:
Error, module does not export `d`