a = np.array([1, 2])
a.tolist()
# Basic syntax:
numpy_array.tolist()
# Example usage:
your_array = np.array([[1, 2, 3], [4, 5, 6]])
your_array
--> array([[1, 2, 3],
[4, 5, 6]])
your_array.tolist()
--> [[1, 2, 3], [4, 5, 6]]
>>> a = np.array([1, 2])
>>> list(a)
[1, 2]
>>> a.tolist()
[1, 2]
import numpy as np
npa = np.asarray(Lists, dtype=np.float32)
# make np array
np_arr = np.array(['a','b','c'])
# np array to list
py_list = np_arr.tolist()
print(py_list)
# output: ['a','b','c']
>>> a = [1, 2]
>>> np.asarray(a)
array([1, 2])
>>> lists = [[1, 2], [3, 4]]
>>> np.array(lists)
array([[1, 2],
[3, 4]])
np.concatenate( list_of_array, axis=0 )