Skip to content

Commit

Permalink
fix: support dlpack
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Oct 31, 2023
1 parent 59c5f3e commit 41f2c56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/awkward/_nplikes/typetracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ def __int__(self) -> int:
def __index__(self) -> int:
raise RuntimeError("cannot realise an unknown value")

def __dlpack_device__(self) -> tuple[int, int]:
raise RuntimeError("cannot realise an unknown value")

def __dlpack__(self, stream: Any = None) -> Any:
raise RuntimeError("cannot realise an unknown value")


def _scalar_type_of(obj) -> numpy.dtype:
if is_unknown_scalar(obj):
Expand Down

0 comments on commit 41f2c56

Please sign in to comment.