Opened 13 years ago

Closed 12 years ago

#3146 closed defect (invalid)

(latex(a\v), a) gives an error about calling something with too many arguments.

Reported by: jason Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

a=matrix(QQ,3,3,range(9))
v=matrix(QQ,3,1,range(3))
(latex(a\v), a)

gives an error.

I think it has to do with the parsing of latex(a\v); it seems to try doing "(latex(a._backslash_(v), a)" (note the missing parenthesis in the call to latex.

You see this parsing in the error from:

@interact
def _(a=matrix(QQ,3,3,range(9)), v=matrix(QQ,3,1,range(3))):
    html('$$%s %s = %s$$'%(latex(a), latex(a\v), latex(v)))

with the patch from #3121

Change History (1)

comment:1 Changed 12 years ago by mhansen

  • Milestone changed from sage-4.0.1 to sage-duplicate/invalid/wontfix
  • Resolution set to invalid
  • Status changed from new to closed

This now works (most likely with the change to how the backslash operator is implemented)

----------------------------------------------------------------------
| Sage Version 4.0.1.rc1, Release Date: 2009-06-04                   |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: a=matrix(QQ,3,3,range(9))
sage: v=matrix(QQ,3,1,range(3))
sage: (latex(a\v), a)

(\left(\begin{array}{r}
\frac{1}{3} \\
0 \\
0
\end{array}\right),
 [0 1 2]
[3 4 5]
[6 7 8])
Note: See TracTickets for help on using tickets.