array增加1行或1列
np.row_stack((nx, row))
np.column_stack((nx, column))
>>> import numpy as np
>>> nx = np.array([[1,2,3],[4,5,6],[7,8,9]])>>> row = nx[-1]
>>> column = nx[:,-1]
>>> nx1 = np.row_stack((nx, row))
>>> nx2 = np.column_stack((nx, column))
>>> nx
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
>>> nx1
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[7, 8, 9]])
>>> nx2
array([[1, 2, 3, 3],
[4, 5, 6, 6],
[7, 8, 9, 9]])
>>>