Skip to content

Commit

Permalink
MNT: fix last remaining direct use of npy_promotion_state
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed May 7, 2024
1 parent 8c10b57 commit 0cc359d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/_core/src/multiarray/multiarraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3493,7 +3493,7 @@ array_can_cast_safely(PyObject *NPY_UNUSED(self),
* TODO: `PyArray_IsScalar` should not be required for new dtypes.
* weak-promotion branch is in practice identical to dtype one.
*/
if (npy_promotion_state == NPY_USE_WEAK_PROMOTION) {
if (get_npy_promotion_state() == NPY_USE_WEAK_PROMOTION) {
PyObject *descr = PyObject_GetAttr(from_obj, npy_ma_str_dtype);
if (descr == NULL) {
goto finish;
Expand Down

0 comments on commit 0cc359d

Please sign in to comment.