Commit 723b89b8 authored by Yuxin Wu's avatar Yuxin Wu

Fix shape in background filler (fix #305)

parent 2d539fea
......@@ -45,7 +45,7 @@ class ConstantBackgroundFiller(BackgroundFiller):
def _fill(self, background_shape, img):
assert img.ndim in [3, 2]
if img.ndim == 3:
return_shape = background_shape + (3,)
return_shape = background_shape + (img.shape[2],)
else:
return_shape = background_shape
return np.zeros(return_shape) + self.value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment