Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: raise error for invalid object in from_dlpack #2662

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Aug 21, 2023

When I wrote this branch in from_dlpack, I think I was considering support for the PyCapsule legacy interface. Apparently I never restored an error case.

Whilst we're at it, this PR also adds support for conversion of index objects to DLPack.

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #2662 (3f670a6) into main (01cbec2) will decrease coverage by 0.01%.
The diff coverage is 55.55%.

Additional details and impacted files
Files Changed Coverage Δ
src/awkward/index.py 89.94% <42.85%> (-2.09%) ⬇️
src/awkward/operations/ak_from_dlpack.py 62.06% <100.00%> (+6.89%) ⬆️

@agoose77 agoose77 temporarily deployed to docs-preview August 21, 2023 12:39 — with GitHub Actions Inactive
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, and also a simple enough fix for me to merge right away. Thanks!

@jpivarski jpivarski merged commit 3b322a2 into main Aug 21, 2023
34 of 36 checks passed
@jpivarski jpivarski deleted the agoose77/fix-dlpack-invalid-object branch August 21, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants