Ask Your Question

Revision history [back]

It is likely a duplicate of this question, you can change the bi-dimensional numpy array X into a list of lists as follows:

sage: Y = [list(x) for x in X]
sage: Y
[[1, 2], [3, 4], [1, 2], [4, 1]]

It is likely somehow a duplicate of this question, you can change the bi-dimensional numpy array X into a list of lists as follows:

sage: Y = [list(x) for x in X]
sage: Y
[[1, 2], [3, 4], [1, 2], [4, 1]]