我有一个有形状的图像(1120,1472,4),我正在尝试将此更改为(3000,3000,4)我编写的代码就是这样。
pad_shape = (3000, 3000)
i = np.array('test.tif')
result = np.zeros(pad_shape,dtype=int)
result[:i.shape[0], :i.shape[1]] = i
print(result)
生成
ValueError: could not broadcast input array from shape (1120, 1472, 4) into shape (3000, 3000)
答案 0 :(得分:0)
这是答案
lblDiscountAmount.Caption = "$" + dblVisits.ToString
Me.refresh
x和y变量用于填充。您因填充而收到的错误。