#17341: visualize_structure for sparse matrices over GF(p) is broken
-------------------------------------+-------------------------------------
Reporter: jhpalmieri | Owner:
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-7.1
Component: linear algebra | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/visualize_structure_for_sparse_matrices_over_gf_p__is_broken|
2110b6a1ec388a7d0e5c9123a0df20fba2312db4
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jhpalmieri):
The changes make sense, but I'm still stuck trying to find an example that
used to be broken and now works. I get something like this with or without
the change:
{{{
sage: M = matrix(GF(2), 1, 2^32, sparse=True)
sage: M.visualize_structure(maxsize=None)
---------------------------------------------------------------------------
OverflowError Traceback (most recent call
last)
<ipython-input-3-f258198422bd> in <module>()
----> 1 M.visualize_structure(maxsize=None)
/Users/jpalmier/Desktop/Sage_stuff/git/sage/src/sage/matrix/matrix2.pyx in
sage.matrix.matrix2.Matrix.visualize_structure
(build/cythonized/sage/matrix/matrix2.c:64652)()
8534 fct = 255.0/bisq
8535 from sage.repl.image import Image
-> 8536 img = Image('RGB', (ir, ic))
8537 pixel = img.pixels()
8538 for x in range(ic):
/Users/jpalmier/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/sage/repl/image.pyc in __init__(self, mode, size, color)
95 16x16px 8-bit Color image
96 """
---> 97 self._pil = PIL.Image.new(mode, size, color)
98
99 @property
/Users/jpalmier/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/PIL/Image.pyc in new(mode, size, color)
2020 color = ImageColor.getcolor(color, mode)
2021
-> 2022 return Image()._new(core.fill(mode, size, color))
2023
2024
OverflowError: signed integer is greater than maximum
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17341#comment:7>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.