From 3f00488871ac169b1fd2f40495ad85cb581cc02b Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Mon, 16 Jan 2023 14:13:21 +0100 Subject: MAINT: Fix stacklevels for the new C dispatcher not adding one --- numpy/core/fromnumeric.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index ca9d55cb7..e7366898e 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2313,7 +2313,7 @@ def sum(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, warnings.warn( "Calling np.sum(generator) is deprecated, and in the future will give a different result. " "Use np.sum(np.fromiter(generator)) or the python sum builtin instead.", - DeprecationWarning, stacklevel=3) + DeprecationWarning, stacklevel=2) res = _sum_(a) if out is not None: -- cgit v1.2.1