Changeset: 577ac8b741ee for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/577ac8b741ee Modified Files: sql/backends/monet5/UDF/pyapi3/pytypes3.c Branch: Dec2023 Log Message:
Numpy 2.0 compatibility. diffs (16 lines): diff --git a/sql/backends/monet5/UDF/pyapi3/pytypes3.c b/sql/backends/monet5/UDF/pyapi3/pytypes3.c --- a/sql/backends/monet5/UDF/pyapi3/pytypes3.c +++ b/sql/backends/monet5/UDF/pyapi3/pytypes3.c @@ -243,8 +243,10 @@ bool PyType_IsNumpyMaskedArray(PyObject { PyObject *type = PyObject_Type(object); PyObject *str = PyObject_Str(type); - bool ret = strcmp(PyUnicode_AsUTF8(str), - "<class 'numpy.ma.core.MaskedArray'>") == 0; + bool ret = strcmp(PyUnicode_AsUTF8(str), /* numpy < 2.0 */ + "<class 'numpy.ma.core.MaskedArray'>") == 0 || + strcmp(PyUnicode_AsUTF8(str), /* numpy >= 2.0 */ + "<class 'numpy.ma.MaskedArray'>") == 0; Py_DECREF(str); Py_DECREF(type); return ret; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org