Skip to content

Commit

Permalink
Handle new default integer type on windows for numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Jun 20, 2024
1 parent cbbf07e commit c1c989e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,9 @@ static PyObject* _get_array(PyObject* item) {
} else {
goto fail;
}
} else if (PyLong_CheckExact(item)) {
dtype = PyArray_DescrFromType(NPY_DEFAULT_INT);
scalar_data = (void*)&il;
} else if (sizeof(long) == sizeof(int32_t)) {
dtype = PyArray_DescrFromType(NPY_INT32);
scalar_data = (void*)&il;
Expand Down

0 comments on commit c1c989e

Please sign in to comment.