📜  numpy make 2d array 1d - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:21.436000             🧑  作者: Mango

代码示例1
import numpy as np
  
ini_array1 = np.array([[1, 2, 3], [2, 4, 5], [1, 2, 3]])
  
# printing initial arrays
print("initial array", str(ini_array1))
  
# Multiplying arrays
result = ini_array1.flatten()
  
# printing result
print("New resulting array: ", result)