Skip to content

Commit f885541

Browse files
committed
Avoid putting 255 into int8 due to new numpy 2 type promotion rules
1 parent 0199582 commit f885541

File tree

1 file changed

+1
-1
lines changed
  • packages/python/plotly/plotly/tests/test_optional/test_px

1 file changed

+1
-1
lines changed

packages/python/plotly/plotly/tests/test_optional/test_px/test_imshow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def test_imshow_source_dtype_zmax(dtype, contrast_rescaling):
341341
assert (
342342
np.abs(
343343
np.max(decode_image_string(fig.data[0].source))
344-
- 255 * img.max() / np.iinfo(dtype).max
344+
- np.int64(255) * img.max() / np.iinfo(dtype).max
345345
)
346346
< 1
347347
)

0 commit comments

Comments
 (0)