Skip to content

Commit

Permalink
restrict fix to typetracer backend
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey committed Jan 21, 2025
1 parent 9c6a55a commit c05a481
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vector/backends/awkward.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,11 @@ class VectorAwkward:

@property
def lib(self): # type:ignore[no-untyped-def]
return _lib(module=numpy, nplike=self.layout.backend.nplike) # type:ignore[attr-defined]
if (
nplike := self.layout.backend.nplike # type:ignore[attr-defined]
) is ak._nplikes.typetracer.TypeTracer.instance():
return _lib(module=numpy, nplike=nplike)
return numpy

def _wrap_result(
self: AwkwardProtocol,
Expand Down

0 comments on commit c05a481

Please sign in to comment.