Commits


Konstantin Malanchev authored and GitHub committed fd84ec0b1a6
GH-39129 [Python] pa.array: add check for byte-swapped numpy arrays inside python objects (#41549) ### What changes are included in this PR? This PR introduces a check to verify if the dtype of the input numpy array is byte-swapped. If it is, a not-implemented exception is raised. This precaution prevents the data from being cast incorrectly as if it were in the correct byte order, which would lead to wrong data values. ### Are these changes tested? I added a new test to check if not-implemented exception is raised - for both old (primitive types) and new (composed types) code. ### Are there any user-facing changes? No changes in API, but old code which gave incorrect results now would fail with a not-implemented exception * GitHub Issue: #39129 Authored-by: Konstantin Malanchev <hombit@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>