Hello,

I've stumbled on a seeming inconsistency while using Fricas and I'm
writing to the mailing list in hopes of getting more understanding of
the issue, or just reporting a bug if the issue is a bug.

Consider the following Fricas session:

(1) -> x : DirectProduct(2, Float) := (2,3)

   (1)  [2.0, 3.0]
                                                 Type: DirectProduct(2,Float)
(2) -> [[(x.j)^i for j in 1..2] for i in 0..1]

   (2)  [[1.0, 1.0], [2.0, 3.0]]
                                                      Type: List(List(Float))
(3) -> [[(x.j)^i for j in 1..2] for i in 0..1]@SquareMatrix(2, Float)

   Cannot convert the value from type List(Float) to Float .

(3) -> [[1.0, 1.0], [2.0, 3.0]]@SquareMatrix(2, Float)

        +1.0  1.0+
   (3)  |        |
        +2.0  3.0+
                                                  Type: SquareMatrix(2,Float)
(4) -> [[(x.j)^i for j in 1..2] for i in 0..1]::SquareMatrix(2, Float)

        +1.0  1.0+
   (4)  |        |
        +2.0  3.0+
                                                  Type: SquareMatrix(2,Float)
(5) -> v : SquareMatrix(2, Float) := [[(x.j)^i for j in 1..2] for i in 0..1]

   Cannot convert the value from type List(Float) to Float .

(5) -> v : SquareMatrix(2, Float) :=
                            matrix [[(x.j)^i for j in 1..2] for i in 0..1]

        +1.0  1.0+
   (5)  |        |
        +2.0  3.0+
                                                  Type: SquareMatrix(2,Float)

Why is it that the list collection can't be automatically converted to
a matrix, if an equivalent list of lists (written directly) can?

Why does using the matrix function help, even though it's not
necessary when using a list of lists directly?

Thank you,
Neven Sajko

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAL%2BbK4OT34%3DqfjKWm54qT8wJb5aG018%3DuaLMQS3%3D1%2BNWQm4%3DDQ%40mail.gmail.com.

Reply via email to