From 974c865219223742a07375bea1f6da246e3326ef Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Wed, 8 Jun 2022 16:35:31 -0700 Subject: API: Add leading underscore to `no_nep50_warning` and `get/set_promotion_state` --- numpy/core/numeric.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index f81cfebce..d6e1d4eec 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -17,7 +17,7 @@ from .multiarray import ( fromstring, inner, lexsort, matmul, may_share_memory, min_scalar_type, ndarray, nditer, nested_iters, promote_types, putmask, result_type, set_numeric_ops, shares_memory, vdot, where, - zeros, normalize_axis_index, get_promotion_state, set_promotion_state) + zeros, normalize_axis_index, _get_promotion_state, _set_promotion_state) from . import overrides from . import umath @@ -27,7 +27,7 @@ from .umath import (multiply, invert, sin, PINF, NAN) from . import numerictypes from .numerictypes import longlong, intc, int_, float_, complex_, bool_ from ._exceptions import TooHardError, AxisError -from ._ufunc_config import errstate, no_nep50_warning +from ._ufunc_config import errstate, _no_nep50_warning bitwise_not = invert ufunc = type(sin) @@ -55,7 +55,7 @@ __all__ = [ 'BUFSIZE', 'ALLOW_THREADS', 'ComplexWarning', 'full', 'full_like', 'matmul', 'shares_memory', 'may_share_memory', 'MAY_SHARE_BOUNDS', 'MAY_SHARE_EXACT', 'TooHardError', 'AxisError', - 'get_promotion_state', 'set_promotion_state'] + '_get_promotion_state', '_set_promotion_state'] @set_module('numpy') @@ -2353,7 +2353,7 @@ def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): array([False, True]) """ def within_tol(x, y, atol, rtol): - with errstate(invalid='ignore'), no_nep50_warning(): + with errstate(invalid='ignore'), _no_nep50_warning(): return less_equal(abs(x-y), atol + rtol * abs(y)) x = asanyarray(a) -- cgit v1.2.1