[BUG] Should cython object buffers check for NULL?
See original GitHub issuePandas seems to semi-regularly run into issues with NumPy’s logic which currently says that object arrays may be filled with NULL
at initialization so that NULL
is accepted everywhere to have the same meaning as None
.
(See also https://github.com/pandas-dev/pandas/pull/47097)
This is a bit weird, since NumPy also fills the array with None
almost always, so in the few places where it doesn’t it is unexpected!
I have opened https://github.com/numpy/numpy/pull/21817 to solve this in NumPy. The intention would be that NumPy for now should accept NULL
, but defines it as incorrect and will never produce it on its own (with some “internal” exceptions).
Now, I am not sure what the best solution is here and if you think that Cython should fix this (or we should do both), I can look into it. In some sense, a fix in cython might be best… then pandas can just upgrade its Cython dependency and stop worrying about these oddities.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I’ll just create a copy of the tests for memoryviews and then it can be closed properly
I think we can close this now, thanks! Will try to remember to ping the pandas folks when I see the release, it sounds like they can remove some awful hacks then 😉.