📅  最后修改于: 2022-03-11 14:47:08.896000             🧑  作者: Mango
import numpy as np
# 1d array to list
arr = np.array([1, 2, 3])
print(f'NumPy Array:\n{arr}')
#NumPy Array: [1 2 3]
list1 = arr.tolist()
print(f'List: {list1}')
#List: [1, 2, 3]