Unverified Commit fa470ebc authored by Miguel Mendez's avatar Miguel Mendez Committed by GitHub
Browse files

Force copy of input img (#297)

parent 02f2573a
...@@ -14,7 +14,7 @@ def imnormalize(img, mean, std, to_rgb=True): ...@@ -14,7 +14,7 @@ def imnormalize(img, mean, std, to_rgb=True):
Returns: Returns:
ndarray: The normalized image. ndarray: The normalized image.
""" """
img = np.float32(img) if img.dtype != np.float32 else img.copy() img = img.copy().astype(np.float32)
return imnormalize_(img, mean, std, to_rgb) return imnormalize_(img, mean, std, to_rgb)
......
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