Ask Your Question

Find a list of list from a Matrix

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

Cyrille gravatar image

Suppose I have a matrix say

L=[[1,2],[3, 4]]

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

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

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


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

Seen: 122 times

Last updated: Jan 19 '23