From 2c4ce5e925b77dd6731ea037258c4843d7ed1a36 Mon Sep 17 00:00:00 2001 From: Jim Newsome Date: Wed, 7 Jan 2026 17:04:01 -0600 Subject: [PATCH] plot_common: use keyword "method" instead of "interpolation" The `interpolation` keyword has been deprecated since numpy 1.22.0, and is removed in numpy 2.4: . `method` is its synonymous replacement. --- tornettools/plot_common.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tornettools/plot_common.py b/tornettools/plot_common.py index c4ef548..7779f01 100644 --- a/tornettools/plot_common.py +++ b/tornettools/plot_common.py @@ -204,13 +204,9 @@ def draw_cdf(axis, data, yscale=None, **kwargs): d = [getfirstorself(item) for item in data] y = __calc_cdf_bins(yscale, axis.gca().get_yaxis()) - # the 'interpolation' parameter name is deprecated and replaced with - # 'method', but this change is recent so we'll stick with the deprecated - # name for now - # https://numpy.org/doc/stable/reference/generated/numpy.quantile.html - # the 'lower' is used to match the behaviour of 'draw_cdf_ci()' above - # https://github.com/shadow/tornettools/issues/76 - x = quantile(d, y, interpolation='lower') + # the method 'lower' is used to match the behaviour of 'draw_cdf_ci()' + # above. See https://github.com/shadow/tornettools/issues/76 + x = quantile(d, y, method='lower') plot_line = axis.plot(x, y, **kwargs) return plot_line[0]