[GAP Forum] Understanding MatrixByBlockMatrix

Max Horn max at quendi.de
Sat Mar 29 23:55:25 GMT 2014


Dear Anvita,

On 21.01.2014, at 13:01, Anvita <anvita21 at gmail.com> wrote:

> Dear Forum,
> 
> How can I avoid getting an error when trying to convert
> a block matrix to an ordinary one in the following example?
> If I enter "return;" in the break loop, I get a "segmentation fault"
> followed by a crash of GAP session.

I am very sorry that we neglected to get back to you on this.
In fact, we discussed the issue you reported, and its origins,
but then somehow (a) nobody thought to inform you about this,
and (b) the proposed fix was not actually implemented.

Sorry for that, and thanks for the helpful code. We have fixed
the crash in our development version, and your code example works
fine now:

gap> z:=Z(4);
Z(2^2)
gap> bm:=BlockMatrix(
>  [[1,1,[[z]]],
>   [2,2,[[z]]]],2,2);
<block matrix of dimensions (2*1)x(2*1)>
gap> Display(bm);
z = Z(4)
z^1   .
  . z^1
gap> MatrixByBlockMatrix(bm);
[ [ Z(2^2), 0*Z(2) ], [ 0*Z(2), Z(2^2) ] ]


The next GAP release should include this fix. If you are impatient,
and know how to compile GAP yourself, here is the relevant
change:

 https://bitbucket.org/gap-system/gap/commits/07df3069edb3d68108bc179f0fae38e32d9bf900


Cheers,
Max



More information about the Forum mailing list