diff --git a/packages/python/plotly/plotly/express/_imshow.py b/packages/python/plotly/plotly/express/_imshow.py index c255bc32692..65a1f61da69 100644 --- a/packages/python/plotly/plotly/express/_imshow.py +++ b/packages/python/plotly/plotly/express/_imshow.py @@ -346,7 +346,7 @@ def imshow( binary_string = img.ndim >= (3 + slice_dimensions) and not is_dataframe # Cast bools to uint8 (also one byte) - if img.dtype == np.bool: + if img.dtype == np.bool_: img = 255 * img.astype(np.uint8) if range_color is not None: