login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #169 Print empty two dimensional array (i.e. Matrix, TwonDimensionalArray ...) revision 4 of 6

1 2 3 4 5 6
Editor: kratt6
Time: 2007/12/20 11:25:48 GMT-8
Note:

added:

From kratt6 Thu Dec 20 11:25:48 -0800 2007
From: kratt6
Date: Thu, 20 Dec 2007 11:25:48 -0800
Subject: 
Message-ID: <20071220112548-0800@axiom-wiki.newsynthesis.org>

Severity: wishlist => minor 


Submitted by : (unknown) at: 2007-11-17T22:01:39-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

Empty one dimensional arrays are printed but no empty two dimensional array in console.

Text Mode
empty Matrix not printed

fricas
)set output algebra on
 
fricas
)set output tex off

fricas
empty()$Vector(INT)
(1) []
Type: Vector(Integer)
fricas
empty()$Matrix(INT)
(2) []
Type: Matrix(Integer)

LaTeX? mode
empty Matrix causes error

fricas
)set output algebra off
 
fricas
)set output tex on

fricas
empty()$Vector(INT)

\label{eq1}\left[ \right](1)
Type: Vector(Integer)
fricas
empty()$Matrix(INT)

\label{eq2}\left[ \right](2)
Type: Matrix(Integer)

property change --kratt6, Thu, 23 Jun 2005 06:32:24 -0500 reply
Category: general => Axiom User Interface

I investigated a little further:
fricas
)se ou tex off
 
fricas
)se ou al on
(matrix [[1,2]])::OUTFORM::SEX
Cannot convert the value from type OutputForm to SExpression .

I believe that this shows that the bug is in the boot display routines. In OUTFORM we find:

        matrix ll ==
            lv:$ := [LIST2VEC$Lisp l for l in ll]
            CONS(eform MATRIX, LIST2VEC$Lisp lv)$Lisp

fricas
matrix []
(5) matrix
Type: Symbol

could be equivalent to empty()$Matrix INT. On the other hand, the interpreter has no way to determine the type of this matrix, so the error is probably OK.

fricas
matrix [[]]
(6) matrix NONE
Type: Symbol

does indeed not make any sense at all.

Severity: wishlist => minor