#8495: Regression: Many mathematica doctests now fail
--------------------------+-------------------------------------------------
   Reporter:  flawrence   |       Owner:  was
       Type:  defect      |      Status:  new
   Priority:  major       |   Milestone:     
  Component:  interfaces  |    Keywords:     
     Author:              |    Upstream:  N/A
   Reviewer:              |      Merged:     
Work_issues:              |  
--------------------------+-------------------------------------------------

Comment(by flawrence):

 Before #3587, mathematica's output was sent to ExpectElement._sage_repr()
 in expect.py, which called repr() and tidied up the results (converting {}
 to [], stripping new line characters etc) then sage_eval() was called on
 the results.  With this approach, mathematica functions that returned
 numbers, symbolic variables or arrays could be imported successfully into
 sage.  The approach had the disadvantage that all symbolic variables had
 to be passed in manually as locals, and that functions couldn't be
 translated from mathematica to their equivalents in sage.

 #3587 instead calls str() on mathematica's results (which has the alarming
 option ascii_art = True), then replaces []s by (), changes everything to
 lower case and sends it to SR.  This works for simple functions but fails
 for arrays and probably anything affected by ascii_art = True

 I'm not familiar with SR, but at a minimum MathematicaElement._sage_()
 should be patched to call sage_repr() instead of str().  I don't know
 whether SR has all the functionality of sage_eval(), e.g. supporting
 arrays.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8495#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to