Commit f0ee73fc authored by Yuxin Wu's avatar Yuxin Wu

use same dtype for const background (fix #408)

parent 2615205e
...@@ -49,7 +49,7 @@ class ConstantBackgroundFiller(BackgroundFiller): ...@@ -49,7 +49,7 @@ class ConstantBackgroundFiller(BackgroundFiller):
return_shape = background_shape + (img.shape[2],) return_shape = background_shape + (img.shape[2],)
else: else:
return_shape = background_shape return_shape = background_shape
return np.zeros(return_shape) + self.value return np.zeros(return_shape, dtype=img.dtype) + self.value
class CenterPaste(ImageAugmentor): class CenterPaste(ImageAugmentor):
......
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