oldk1331 wrote:
> 
> Patch is here:
> 
> diff --git a/src/algebra/array2.spad b/src/algebra/array2.spad
> index 8604a9c..3d751da 100644
> --- a/src/algebra/array2.spad
> +++ b/src/algebra/array2.spad
> @@ -1015,9 +1015,10 @@ TwoDimensionalArrayCategory(R, Row, Col) : Category 
> == Definition where
>  
>        coerce(m : %) ==
>          l : List List OutputForm
> -        l := [[qelt(m, i, j) :: OutputForm _
> -                  for j in minColIndex(m)..maxColIndex(m)] _
> -                  for i in minRowIndex(m)..maxRowIndex(m)]
> +        minC := minColIndex m; maxC := maxColIndex m
> +        minR := minRowIndex m; maxR := maxRowIndex m
> +        minC > maxC or minR > maxR => return []::OutputForm
> +        l := [[qelt(m, i, j) :: OutputForm for j in minC..maxC] for i in 
> minR..maxR]
>          matrix l


1) Printing [] for matrix with zero rows is better than current
state.  However for matrices with zero columns your code
looses information about number of rows.

2) You may pass list to 'matrix' in OutputForm and the results
should be as close as possible.  Since you are loosing
info about number of columns you can change 'matrix' in
OutputForm so that empty l gives '[]'.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to