#5273: [with patch, positive review] change error message for integer matrices
which are too large
------------------------------------+---------------------------------------
 Reporter:  jhpalmieri              |        Owner:  jhpalmieri
     Type:  defect                  |       Status:  new       
 Priority:  trivial                 |    Milestone:  sage-3.4.1
Component:  linear algebra          |   Resolution:            
 Keywords:  32-bit, 64-bit, matrix  |  
------------------------------------+---------------------------------------
Changes (by mabshoff):

 * cc: cwitty (added)

Comment:

 This ticket fails to import for me:
 {{{
 mabsh...@sage:/scratch/mabshoff/sage-3.3.rc1/devel/sage$ patch -p1 --dry-
 run < trac_5273.patch
 patching file sage/matrix/matrix_space.py
 Hunk #1 FAILED at 197.
 Hunk #2 FAILED at 215.
 2 out of 2 hunks FAILED -- saving rejects to file
 sage/matrix/matrix_space.py.rej
 }}}
 Note that Carl Witty already fixed a bug here recently since signed ints
 were used:
 {{{
         parent_gens.ParentWithGens.__init__(self, base_ring)
         if not isinstance(base_ring, ring.Ring):
             raise TypeError, "base_ring must be a ring"
         if ncols == None: ncols = nrows
         nrows = int(nrows)
         ncols = int(ncols)
         if nrows < 0:
             raise ArithmeticError, "nrows must be nonnegative"
         if ncols < 0:
             raise ArithmeticError, "ncols must be nonnegative"

         if sage.misc.misc.is_64_bit:
             if nrows >= 2**63 or ncols >= 2**63:
                 raise ValueError, "number of rows and columns must be less
 than 2^63"
         else:
             if nrows >= 2**31 or ncols >= 2**31:
                 raise ValueError, "number of rows and columns must be less
 than 2^31 (on a 32-bit computer -- use a 64-bit computer for bigger
 matrices)"
 }}}
 This patch went into 3.3.alpha6 via #5193, so it looks like the problem
 has already been fixed.

 Thoughts?

 Cheers,

 Michael

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5273#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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