From 2545efb28480a6eaad03c224454ae304c4b8b704 Mon Sep 17 00:00:00 2001 From: Marten Henric van Kerkwijk Date: Thu, 29 Aug 2024 20:53:57 -0400 Subject: [PATCH] BUG: .ptp() method no longer present in numpy 2.0 --- screens/conjspec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screens/conjspec.py b/screens/conjspec.py index a0794d3..6d7d117 100644 --- a/screens/conjspec.py +++ b/screens/conjspec.py @@ -119,7 +119,7 @@ def from_dynamic_spectrum(cls, dynspec, normalization='mean', **kwargs): # TODO: relax this assumption. if fd is None: t_step = np.abs(np.diff(t, axis=-2)).min() - n_t = round((t.ptp()/t_step).to_value(1).item()) + 1 + n_t = round((np.ptp(t)/t_step).to_value(1).item()) + 1 fd = np.fft.fftshift(np.fft.fftfreq(n_t, t_step).to(u.mHz)) fd = expand(fd, n=dynspec.ndim) linear_axis = "transform"