Zero pad an array to the next power-of-2 size

前端 未结 0 440
长发绾君心
长发绾君心 2020-12-04 15:09

As mentioned in Zero pad numpy array, this function zero pads an array:

A = np.array([1,2,3,4,5])
B = np.pad(A, (0, 3), \'constant\')   # array([1, 2, 3, 4, 5         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题