Skip to content

[BUG] Should cython object buffers check for NULL? #4858

Closed
@seberg

Description

@seberg

Pandas 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 pandas-dev/pandas#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 numpy/numpy#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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions