forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-42112: [Python] Array gracefully fails on non-cpu device (ap…
…ache#42113) ### Rationale for this change Common `Array` APIs should not segfault or abort on non-cpu devices. ### What changes are included in this PR? * `device_type` and `is_cpu` methods added to the `Array` class * Any function that segfaults, aborts, or gives incorrect results on non-cpu devices now raises an exception ### Are these changes tested? * Unit tests added ### Are there any user-facing changes? * `device_type` and `is_cpu` methods added to the `Array` class * GitHub Issue: apache#42112 Lead-authored-by: Dane Pitkin <dpitkin@apache.org> Co-authored-by: Dane Pitkin <dpitkin.oss@gmail.com> Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
- Loading branch information
1 parent
3834a38
commit a42ec1d
Showing
4 changed files
with
151 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.