numpy tile 和 matlab repmat

如果matrix 是二维,numpy tile 和 matlab repmat表现一样。
如果是三维张量,那么需要

    gg = temp_gg[:,:,np.newaxis]
   np.tile(gg, (1,1,dimY[n]))

改。

你可能感兴趣的:(python)