Ask Your Question
0

Find a list of list from a Matrix

asked 2023-01-19 08:33:57 +0100

Cyrille gravatar image

Suppose I have a matrix say

L=[[1,2],[3, 4]]
M=matrix(L)

then after a few operations M is transformed in N say

N = matrix([[10,12],[33,14]])

how can I obtain the list NN = [[10,12],[33,14]].

If know that N.coefficients() = N.list() = [10,12,33,14] but what I want is [[10,12],[33,14]].

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-19 08:50:25 +0100

achrzesz gravatar image

For example:

[list(r) for r in N.rows()]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-01-19 08:33:57 +0100

Seen: 185 times

Last updated: Jan 19 '23