From 9d5eafe596e75e30a85c01ed62bb5bea9389adc8 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 10 Feb 2023 15:51:57 +0100 Subject: MAINT: Use `np._using_numpy2_behavior()` and initialize it in C --- numpy/core/multiarray.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/core/multiarray.py') diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py index ec1294b85..d11283345 100644 --- a/numpy/core/multiarray.py +++ b/numpy/core/multiarray.py @@ -17,7 +17,7 @@ from ._multiarray_umath import ( fastCopyAndTranspose, _flagdict, from_dlpack, _place, _reconstruct, _vec_string, _ARRAY_API, _monotonicity, _get_ndarray_c_version, _get_madvise_hugepage, _set_madvise_hugepage, - _get_promotion_state, _set_promotion_state, + _get_promotion_state, _set_promotion_state, _using_numpy2_behavior ) __all__ = [ @@ -42,7 +42,7 @@ __all__ = [ 'set_legacy_print_mode', 'set_numeric_ops', 'set_string_function', 'set_typeDict', 'shares_memory', 'tracemalloc_domain', 'typeinfo', 'unpackbits', 'unravel_index', 'vdot', 'where', 'zeros', - '_get_promotion_state', '_set_promotion_state'] + '_get_promotion_state', '_set_promotion_state', '_using_numpy2_behavior'] # For backward compatibility, make sure pickle imports these functions from here _reconstruct.__module__ = 'numpy.core.multiarray' @@ -72,6 +72,7 @@ seterrobj.__module__ = 'numpy' zeros.__module__ = 'numpy' _get_promotion_state.__module__ = 'numpy' _set_promotion_state.__module__ = 'numpy' +_using_numpy2_behavior.__module__ = 'numpy' # We can't verify dispatcher signatures because NumPy's C functions don't -- cgit v1.2.1