Skip to content

Commit

Permalink
Revert "fix: drop lengths recursively (#2775)"
Browse files Browse the repository at this point in the history
This reverts commit 8f2285a.
  • Loading branch information
agoose77 committed Nov 1, 2023
1 parent aed7f20 commit 21e5ae7
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/awkward/contents/bitmaskedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
tt = TypeTracer.instance()
return BitMaskedArray(
self._mask.to_nplike(tt),
self._content._to_typetracer(forget_length),
self._content._to_typetracer(False),
self._valid_when,
unknown_length if forget_length else self.length,
self._lsb_order,
Expand Down
2 changes: 1 addition & 1 deletion src/awkward/contents/bytemaskedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
mask = self._mask.to_nplike(tt)
return ByteMaskedArray(
mask.forget_length() if forget_length else mask,
self._content._to_typetracer(forget_length),
self._content._to_typetracer(False),
self._valid_when,
parameters=self._parameters,
)
Expand Down
2 changes: 1 addition & 1 deletion src/awkward/contents/indexedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
index = self._index.to_nplike(TypeTracer.instance())
return IndexedArray(
index.forget_length() if forget_length else index,
self._content._to_typetracer(forget_length),
self._content._to_typetracer(False),
parameters=self._parameters,
)

Expand Down
2 changes: 1 addition & 1 deletion src/awkward/contents/indexedoptionarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
index = self._index.to_nplike(TypeTracer.instance())
return IndexedOptionArray(
index.forget_length() if forget_length else index,
self._content._to_typetracer(forget_length),
self._content._to_typetracer(False),
parameters=self._parameters,
)

Expand Down
2 changes: 1 addition & 1 deletion src/awkward/contents/listarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
return ListArray(
starts.forget_length() if forget_length else starts,
self._stops.to_nplike(tt),
self._content._to_typetracer(forget_length),
self._content._to_typetracer(False),
parameters=self._parameters,
)

Expand Down
2 changes: 1 addition & 1 deletion src/awkward/contents/listoffsetarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
offsets = self._offsets.to_nplike(TypeTracer.instance())
return ListOffsetArray(
offsets.forget_length() if forget_length else offsets,
self._content._to_typetracer(forget_length),
self._content._to_typetracer(False),
parameters=self._parameters,
)

Expand Down
2 changes: 1 addition & 1 deletion src/awkward/contents/unionarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def _to_typetracer(self, forget_length: bool) -> Self:
return UnionArray(
tags.forget_length() if forget_length else tags,
self._index.to_nplike(tt),
[x._to_typetracer(forget_length) for x in self._contents],
[x._to_typetracer(False) for x in self._contents],
parameters=self._parameters,
)

Expand Down
15 changes: 0 additions & 15 deletions tests/test_2765_slice_from_typetracer.py

This file was deleted.

0 comments on commit 21e5ae7

Please sign in to comment.