Skip to content

Commit e75fbca

Browse files
committed
Remove deprecated numpy types in tests
1 parent 1d30117 commit e75fbca

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: packages/python/plotly/_plotly_utils/tests/validators/test_integer_validator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_acceptance_min_max(val, validator_min_max):
5858

5959

6060
@pytest.mark.parametrize(
61-
"val", [-1.01, -10, 2.1, 3, np.iinfo(np.int).max, np.iinfo(np.int).min]
61+
"val", [-1.01, -10, 2.1, 3, np.iinfo(int).max, np.iinfo(int).min]
6262
)
6363
def test_rejection_min_max(val, validator_min_max):
6464
with pytest.raises(ValueError) as validation_failure:

Diff for: packages/python/plotly/plotly/tests/test_optional/test_px/test_imshow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from plotly.express.imshow_utils import rescale_intensity
1010

1111
img_rgb = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]]], dtype=np.uint8)
12-
img_gray = np.arange(100, dtype=np.float).reshape((10, 10))
12+
img_gray = np.arange(100, dtype=float).reshape((10, 10))
1313

1414

1515
def decode_image_string(image_string):
@@ -47,7 +47,7 @@ def test_automatic_zmax_from_dtype():
4747
dtypes_dict = {
4848
np.uint8: 2**8 - 1,
4949
np.uint16: 2**16 - 1,
50-
np.float: 1,
50+
float: 1,
5151
bool: 255,
5252
}
5353
for key, val in dtypes_dict.items():

Diff for: packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ def test_numpy_integer_import(self):
414414
import plotly.graph_objects as go
415415
from plotly.subplots import make_subplots
416416

417-
indices_rows = np.array([1], dtype=np.int)
418-
indices_cols = np.array([1], dtype=np.int)
417+
indices_rows = np.array([1], dtype=int)
418+
indices_cols = np.array([1], dtype=int)
419419
fig = make_subplots(rows=1, cols=1)
420420
fig.add_trace(go.Scatter(y=[1]), row=indices_rows[0], col=indices_cols[0])
421421

0 commit comments

Comments
 (0)