Am Sonntag, 21. Juni 2015 09:21:31 UTC+2 schrieb Martin R:
>
>
>
> Am Sonntag, 21. Juni 2015 03:56:43 UTC+2 schrieb Nils Bruin:
>>
>> On Saturday, June 20, 2015 at 3:34:06 PM UTC-7, Martin R wrote:
>>>
>>>
>>> What is the bug here? Do you think matrix(2,3,1) should succeed? Do you 
>>> think it should produce a different error message?
>>>
>>> No, I think that matrix(nrows, ncols, element) sould fail, unless 
>>> element is callable or iterable.
>>>
>>
>> We'd need to do serious *extra* work and checking for that. Currently, if 
>> MatrixSpace(R,n,m)(L) works then matrix(R,n,m,L) will work too. Making sure 
>> that matrix(R,n,m,L) breaks for some L where MatrixSpace succeeds would 
>> require extra testing and explicit error raising. 
>>
>
> That was my initial question in this thread: I do not understand where (or 
> why) MatrixSpace calls _matrix_constructor.  I set a breakpoint in 
> _matrix_constructor and did M=MatrixSpace(SR, 2,2) and then trace("M(x)").  
> The breakpoint was never reached. 
>

Just to make sure, I checked this and did the trivial modification to make 
_matrix_constructor fail if only a single ring element is given.  There 
doesn't seem to be any serious problem.

There are several doctests that fail, but only for the trivial reason that 
they (or functions involved) call matrix to produce a scalar matrix.

So, if anybody is interested, I'd open a ticket and do the necessary 
changes and deprecate matrix(nrows, ncols, single_element).  (Please let me 
know.)

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to