diff --git a/python/taichi/misc/gui.py b/python/taichi/misc/gui.py index e921f3006043c..e0bf309061dec 100644 --- a/python/taichi/misc/gui.py +++ b/python/taichi/misc/gui.py @@ -196,7 +196,7 @@ def clear(self, color=None): def cook_image(self, img): if img.dtype in [np.uint8, np.uint16, np.uint32, np.uint64]: img = img.astype(np.float32) * (1 / np.iinfo(img.dtype).max) - elif img.dtype in [np.float32, np.float64]: + elif img.dtype in [np.float16, np.float32, np.float64]: img = img.astype(np.float32) else: raise ValueError(