First time here? Check out the FAQ!

Ask Your Question
0

Find a list of list from a Matrix

asked 2 years ago

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]].

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 2 years ago

achrzesz gravatar image

For example:

[list(r) for r in N.rows()]
Preview: (hide)
link

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: 2 years ago

Seen: 269 times

Last updated: Jan 19 '23