Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: port numpy #16266 #3630

Merged
merged 2 commits into from May 23, 2020
Merged

ENH: port numpy #16266 #3630

merged 2 commits into from May 23, 2020

Conversation

jbrockmendel
Copy link
Contributor

copy paste of the __init__.pxd edits in numpy/numpy#16266

@@ -34,6 +34,7 @@ cdef extern from *:

cdef extern from "Python.h":
ctypedef int Py_intptr_t
bint PyObject_TypeCheck(object obj, PyTypeObject* type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a declaration for this in cpython.object, which can (and should) just be cimported instead to avoid the duplication here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update. any thoughts on if this can/should be nogil? there was some discussion on this in the numpy thread

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not documented as not requiring the GIL and Pandas apparently doesn't need it according to the discussion over there. We shouldn't take decisions for the CPython project on our side that they may regret at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. If/when this goes through, ill make a follow-up PR in numpy to use the cimport for PyObject_TypeCheck

@scoder scoder added this to the 3.0 milestone May 23, 2020
@scoder scoder merged commit f9240f2 into cython:master May 23, 2020
@jbrockmendel jbrockmendel deleted the port_np branch May 24, 2020 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants