id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
4492,block_matrix reacts inconsistently with 0,jbmohler,was,"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.
'''Apply''':
1. [attachment:4492_block_matrix_rebased.patch]
1. [attachment:trac_4492-block-matrix-reviewer.patch]
1. [attachment:4492_typo.patch]
1. [attachment:trac_4492-doctest-number-field.patch]
",defect,closed,major,sage-4.6.2,linear algebra,fixed,,craigcitro jason davidloeffler,sage-4.6.2.alpha3,Willem Jan Palenstijn,"Aly Deines, Rob Beezer",N/A,,,,,