Skip to content

Commit a092281

Browse files
committed
Use np.ptp rather than ndarray method for compatibility with numpy 2.x.
1 parent 2cec104 commit a092281

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glue_qt/plugins/dendro_viewer/data_viewer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _update_limits(self, layout=None):
4545
x, y = self.state._layout.xy
4646
x, y = x[::3], y[::3]
4747
xlim = np.array([x.min(), x.max()])
48-
xpad = .05 * xlim.ptp()
48+
xpad = .05 * np.ptp(xlim)
4949
xlim[0] -= xpad
5050
xlim[1] += xpad
5151

@@ -56,7 +56,7 @@ def _update_limits(self, layout=None):
5656
ylim[0] /= pad
5757
ylim[1] *= pad
5858
else:
59-
pad = .05 * ylim.ptp()
59+
pad = .05 * np.ptp(ylim)
6060
ylim[0] -= pad
6161
ylim[1] += pad
6262

0 commit comments

Comments
 (0)