Skip to content

MAINT: Remove use of PyArray_GetCastFunc #55996

Closed
@seberg

Description

@seberg

pandas uses PyArray_GetCastFunc in the json reader (or writer). As far as I can tell, it is used only for simple NumPy numeric types.

I want to remove this from NumPy, because for many years NumPy never uses those cast functions internally (OK, a few were never replaced but not most are unused).
From glancing at it, I think you can just add a few branches and cast manually. If needed, I could create a new PyArray_CastBuffer() function, but I suspect that would just add overhead for something that is simple enough.

EDIT: I will add the note, that the castfunc never deals with unaligned or memory or byteswapping. So this is really just a C cast.

Metadata

Metadata

Assignees

Labels

CleanIO JSONread_json, to_json, json_normalize

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions