Closed
Description
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.