#4492: block_matrix reacts inconsistently with 0
----------------------+-----------------------------------------------------
 Reporter:  jbmohler  |       Owner:  tbd
     Type:  defect    |      Status:  new
 Priority:  major     |   Milestone:     
Component:  algebra   |    Keywords:     
----------------------+-----------------------------------------------------
 Using ZZ(0) as an element of the list passed to block_matrix appears to be
 a special case somehow and throws an exception rather than creating the
 matrix seems reasonable to me.

 {{{
 sage: i=MatrixSpace(ZZ,2,2)(1)
 sage: i

 [1 0]
 [0 1]
 sage: block_matrix([1,i,1,1])  # this works as I expect

 [1 0|1 0]
 [0 1|0 1]
 [---+---]
 [1 0|1 0]
 [0 1|0 1]
 sage: block_matrix([0,i,1,1])  # this doesn't ... why is 0 special
 ...
 ValueError: Insufficient information to determine dimensions.
 }}}
 This feels to me like a hazardous inconsistency.

 Perhaps I should also add that I don't really like that it just blithely
 assumes I want a square matrix (although I did in my actual usage).
 Ticket #2429 addresses that issue more wholeheartedly.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4492>
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