python append不适用于2d数组中的axis=1。
import numpy as np
TwoDArray = np.array([[11, 15, 10, 6],
[10, 14, 11, 5],
[12, 17, 12, 8],
[15, 18, 14, 9]])
print(TwoDArray)
new2d = np.append(TwoDArray, [[1,2,3,4]], axis=1) #this line of code has the problem
print(new2d)
1条答案
按热度按时间of1yzvn41#