![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
numpy
onexming
这个作者很懒,什么都没留下…
展开
-
np.newaxis
在原有得到矩阵中增加一个轴,实际上上np.newaxis的值为无print(np.newaxis)#Nonenp.newaxis的位置决定要在哪个维度增加import numpy as npa = np.arange(1, 10)a = np.reshape(a, (3, 3))print(a[:, np.newaxis].shape)'''shape(3, 1...原创 2018-08-28 10:56:10 · 155 阅读 · 0 评论 -
使用numpy实现图片等距离剪切
def slice_image(image, stride, image_size): # 切分一行图片,长条图片 def slice_image_y(image, stride, image_size): h, _, _ = image.shape image_list = [] for i in range(0, h, strid...原创 2018-11-22 18:55:15 · 1242 阅读 · 0 评论