File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed
numpy/_core/src/multiarray Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -276,8 +276,8 @@ static int
276
276
PyArray_Descr * descr = PyArray_DescrFromType (NPY_ @TYPE @);
277
277
int promotion_state = get_npy_promotion_state ();
278
278
if (promotion_state == NPY_USE_LEGACY_PROMOTION || (
279
- get_npy_promotion_state () == NPY_USE_WEAK_PROMOTION_AND_WARN
280
- && !npy_give_promotion_warnings ())) {
279
+ promotion_state == NPY_USE_WEAK_PROMOTION_AND_WARN
280
+ && !npy_give_promotion_warnings ())) {
281
281
/*
282
282
* This path will be taken both for the "promotion" case such as
283
283
* `uint8_arr + 123` as well as the assignment case.
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ NPY_NO_EXPORT PyObject *NO_NEP50_WARNING_CTX = NULL;
56
56
NPY_NO_EXPORT PyObject * npy_DTypePromotionError = NULL ;
57
57
NPY_NO_EXPORT PyObject * npy_UFuncNoLoopError = NULL ;
58
58
59
- NPY_NO_EXPORT NPY_TLS int npy_promotion_state = NPY_USE_LEGACY_PROMOTION ;
59
+ static NPY_TLS int npy_promotion_state = NPY_USE_LEGACY_PROMOTION ;
60
60
61
61
NPY_NO_EXPORT int
62
62
get_npy_promotion_state () {
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ extern NPY_NO_EXPORT npy_intp REQUIRED_STR_LEN[];
13
13
#define NPY_USE_WEAK_PROMOTION 1
14
14
#define NPY_USE_WEAK_PROMOTION_AND_WARN 2
15
15
16
- extern NPY_NO_EXPORT NPY_TLS int npy_promotion_state ;
17
16
extern NPY_NO_EXPORT PyObject * NO_NEP50_WARNING_CTX ;
18
17
extern NPY_NO_EXPORT PyObject * npy_DTypePromotionError ;
19
18
extern NPY_NO_EXPORT PyObject * npy_UFuncNoLoopError ;
You can’t perform that action at this time.
0 commit comments