How do I convert a NumPy array to a Python List (for example [[1,2,3],[4,5,6]]
), and do it reasonably fast?
|
Use
|
||||
|
NumPy arrays have a tolist method:
|
||||
|
You can also use the list keyword of Python to create a list from the numpy array:
|
|||
|