From a09228123fdcf923d05de970de24ce029d011004 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Mon, 24 Jun 2024 00:27:33 -0400 Subject: [PATCH] Use np.ptp rather than ndarray method for compatibility with numpy 2.x. --- glue_qt/plugins/dendro_viewer/data_viewer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glue_qt/plugins/dendro_viewer/data_viewer.py b/glue_qt/plugins/dendro_viewer/data_viewer.py index 78e76b4d..d888feb1 100644 --- a/glue_qt/plugins/dendro_viewer/data_viewer.py +++ b/glue_qt/plugins/dendro_viewer/data_viewer.py @@ -45,7 +45,7 @@ def _update_limits(self, layout=None): x, y = self.state._layout.xy x, y = x[::3], y[::3] xlim = np.array([x.min(), x.max()]) - xpad = .05 * xlim.ptp() + xpad = .05 * np.ptp(xlim) xlim[0] -= xpad xlim[1] += xpad @@ -56,7 +56,7 @@ def _update_limits(self, layout=None): ylim[0] /= pad ylim[1] *= pad else: - pad = .05 * ylim.ptp() + pad = .05 * np.ptp(ylim) ylim[0] -= pad ylim[1] += pad