Closed flexatone closed 1 year ago
// Try to identify Pandas Timestamp NATs if (PyObject_HasAttrString(element, "to_numpy")) { PyObject *to_numpy = PyObject_GetAttrString(element, "to_numpy"); if (!PyCallable_Check(to_numpy)) { Py_RETURN_FALSE; } PyObject* post = PyObject_CallFunction(to_numpy, NULL); if (post == NULL) return NULL; return PyBool_FromLong(PyArrayScalar_VAL(post, Datetime) == NPY_DATETIME_NAT); }