Merge pull request #189 from tonysyu/fix-stack-copy

BUG: Revert stackcopy; fixes (M, N, 1) case.
This commit is contained in:
Stefan van der Walt
2012-05-16 10:53:18 -07:00
+5 -1
View File
@@ -22,7 +22,11 @@ def _stackcopy(a, b):
Color images are stored as an ``MxNx3`` or ``MxNx4`` arrays.
"""
a[:] = b[:, :, np.newaxis]
if a.ndim == 3:
a[:] = b[:, :, np.newaxis]
else:
a[:] = b
def warp(image, reverse_map, map_args={},
output_shape=None, order=1, mode='constant', cval=0.):