#14785: Trouble to display a big matrix in the notebook
------------------------+---------------------------------------------------
Reporter: bouillot | Owner: jason, mpatel, was, kini
Type: defect | Status: new
Priority: major | Milestone: sage-5.11
Component: notebook | Keywords: matrix, notebook
Work issues: | Report Upstream: N/A
Reviewers: | Authors: Olivier Bouillot
Merged in: | Dependencies:
Stopgaps: |
------------------------+---------------------------------------------------
Hello,
I want to report something I think to be a bug that I've seen in the
notebook. It concerns the display of (big) matrix.
For example, you can obtain it by the following, when the typeset option
is not marked:
{{{
sage: matrix(19,20,0)
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
sage: matrix(20,20)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_47.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("bWF0cml4KDIwLDIwKQ=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpsCxNoh/___code___.py", line 3, in <module>
exec compile(u'matrix(_sage_const_20 ,_sage_const_20 )
File "", line 1, in <module>
File "matrix0.pyx", line 1729, in sage.matrix.matrix0.Matrix.__repr__
(sage/matrix/matrix0.c:9374)
File "/opt/sagemath/sage-5.9-optional-i686-Linux/local/lib/python2.7
/site-packages/sage/misc/sageinspect.py", line 1915, in
sage_getvariablename
for frame in inspect.stack():
File
"/opt/sagemath/sage-5.9-optional-i686-Linux/local/lib/python/inspect.py",
line 1054, in stack
return getouterframes(sys._getframe(1), context)
File
"/opt/sagemath/sage-5.9-optional-i686-Linux/local/lib/python/inspect.py",
line 1032, in getouterframes
framelist.append((frame,) + getframeinfo(frame, context))
File
"/opt/sagemath/sage-5.9-optional-i686-Linux/local/lib/python/inspect.py",
line 1007, in getframeinfo
lines, lnum = findsource(frame)
File
"/opt/sagemath/sage-5.9-optional-i686-Linux/local/lib/python/inspect.py",
line 528, in findsource
if not sourcefile and file[0] + file[-1] != '<>':
IndexError: string index out of range
}}}
When the typeset option is marked, sage compute correctly the matrix
(20,20), but nothing is written.
When you use a terminal, this error doesn't happen:
{{{
sage: a=matrix (20,20)
sage: a
20 x 20 dense matrix over Integer Ring (type 'print a.str()' to see all of
the entries)
sage: a.str()
'[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0]\n[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]'
}}}
Thanks a lot,
Olivier Bouillot
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14785>
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 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-trac.
For more options, visit https://groups.google.com/groups/opt_out.