From c855cecce28d5f925c5b2e015a0bdfd1aa472590 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 27 May 2022 15:10:59 -0700 Subject: API: Expose `get_promotion_state` and `set_promotion_state` We need to be able to query the state for testing, probably should be renamed before the end, but need to have something for now. --- numpy/core/multiarray.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'numpy/core/multiarray.py') diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py index 8c14583e6..e8ac27987 100644 --- a/numpy/core/multiarray.py +++ b/numpy/core/multiarray.py @@ -40,7 +40,8 @@ __all__ = [ 'ravel_multi_index', 'result_type', 'scalar', 'set_datetimeparse_function', 'set_legacy_print_mode', 'set_numeric_ops', 'set_string_function', 'set_typeDict', 'shares_memory', 'tracemalloc_domain', 'typeinfo', - 'unpackbits', 'unravel_index', 'vdot', 'where', 'zeros'] + 'unpackbits', 'unravel_index', 'vdot', 'where', 'zeros', + 'get_promotion_state', 'set_promotion_state'] # For backward compatibility, make sure pickle imports these functions from here _reconstruct.__module__ = 'numpy.core.multiarray' @@ -68,6 +69,8 @@ promote_types.__module__ = 'numpy' set_numeric_ops.__module__ = 'numpy' seterrobj.__module__ = 'numpy' zeros.__module__ = 'numpy' +get_promotion_state.__module__ = 'numpy' +set_promotion_state.__module__ = 'numpy' # We can't verify dispatcher signatures because NumPy's C functions don't -- cgit v1.2.1