Does any one know how to convert this array into a python list, my ultimate result should be [[1,2,3],[4,6,8]] . Any suggestion would be greatly appreciated.
import numpy as np
from numpy import*
a = [array([ 1, 2, 3], dtype=int16), array([4, 6, 8],
dtype=int16)]
Simply use Numpys tolist function.
np.array(a).tolist()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With