On Monday, May 23, 2016 at 9:22:35 AM UTC-7, Guillaume Holler wrote:
>
> I don't know if this is the right place to submit bugs. 
>

It's a reasonable place to start.
 

> I have consistently reproduced the following bug:
>

I have tried and was unable to reproduce your results on 7.2. Can you give 
the *exact* input you're giving and the *exact* exception you're getting 
back? (you can cull some of the traceback)
 

>
> Here is an example code snipet:
>
> F.<r2,r3> = NumberField([x^2 - 2, x^2 - 3])
>
> M  = Matrix(F, 8, 8)
>
> block = Matrix(F, [ [r2, r3 ] ])
> M.set_block(2, 2, block))
>

I get a syntax error on that last instruction for a mismatched ")". If I 
remove the extra ")" it works fine.
 

> M  = Matrix(F, 8, 8)
>
> block = Matrix(F, [ [r2, r3 ] ])
> M.set_block(2, 2, block))
>
> # KO this time 
>

I assume with "KO" you mean "I get an error". For me this works once I fix 
the ")". 

>
> After some investigation with the help of SageMathCell, it seems that at 
> some point
> the test:
>
> M.parent().base_ring() is block.parent().base_ring()
>
> This makes me think in the code you actually ran (the code you pasted in 
is not what you ran, because it has a syntax error in it and you would have 
noticed that) might have redefined the field F somewhere between the 
definition of M and of "block", so that they have base rings that are 
isomorphic, but sage doesn't know a canonical isomorphism between them.

Just so it's clear what I've tested:

sage: F.<r2,r3> = NumberField([x^2 - 2, x^2 - 3])
sage: M = Matrix(F, 8, 8)
sage: block = Matrix(F, [ [r2, r3 ] ])
sage: M.set_block(2, 2, block)
sage: M = Matrix(F, 8, 8)
sage: block = Matrix(F, [ [r2, r3 ] ])
sage: M.set_block(2, 2, block)

produces no error for me

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

Reply via email to