Numpy的一些记录 产生numpy.array的方式 import numpy as np arr1 = np.array([1, 2, 3]) print(arr1) arr2 = np.zeros(3) print(arr2) arr3 = np.ones(3) print(arr3) arr4 = np.random.randint(1, 10, 3) print(arr4) arr5 = np.arange(3) print(arr5) arr6 = np.linspace(1, 3,…