python [:,::-1]

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34690929/article/details/80209451
In [33]: t = np.array([[1,2,3],[4,5,6],[7,8,9]])

In [34]: y = t[:,::-1]

In [35]: y
Out[35]: 
array([[3, 2, 1],
       [6, 5, 4],
       [9, 8, 7]])

没有更多推荐了,返回首页