Skip to content

Commit

Permalink
whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrommyd committed Feb 7, 2025
1 parent 8c5f0d3 commit 2efab45
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/awkward/_nplikes/virtual.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ def materialize_if_virtual(*args: Any) -> tuple[Any, ...]:
)


def unmaterialize_if_virtual(*args: Any) -> tuple[Any, ...]:
def dematerialize_if_virtual(*args: Any) -> tuple[Any, ...]:
"""
A little helper function to unmaterialize all virtual arrays in a list of arrays.
A little helper function to dematerialize all virtual arrays in a list of arrays.
"""
return tuple(
arg.unmaterialize() if isinstance(arg, VirtualArray) else arg for arg in args
arg.dematerialize() if isinstance(arg, VirtualArray) else arg for arg in args
)


Expand Down Expand Up @@ -106,7 +106,7 @@ def materialize(self) -> ArrayLike:
self._array = self._nplike.asarray(self.generator())
return cast(ArrayLike, self._array)

def unmaterialize(self) -> VirtualArray:
def dematerialize(self) -> VirtualArray:
if self._array is not UNMATERIALIZED:
self._materialized_form_keys.remove(self.form_key)
self._array = UNMATERIALIZED
Expand Down
2 changes: 1 addition & 1 deletion src/awkward/operations/ak_dematerialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def action(layout, backend, **kwargs):
if isinstance(layout, ak.contents.NumpyArray):
buffer = layout.data
if isinstance(buffer, VirtualArray):
out = buffer.unmaterialize()
out = buffer.dematerialize()
else:
out = VirtualArray(
nplike_of_obj(buffer), buffer.shape, buffer.dtype, lambda: buffer
Expand Down
4 changes: 2 additions & 2 deletions src/awkward/operations/ak_materialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def materialize(
yield (array,)

# Implementation
return _impl1(array, highlevel, behavior, attrs)
return _impl(array, highlevel, behavior, attrs)


def _impl1(array, highlevel, behavior, attrs):
def _impl(array, highlevel, behavior, attrs):
with HighLevelContext(behavior=behavior, attrs=attrs) as ctx:
layout = ctx.unwrap(array, allow_record=True, primitive_policy="error")

Expand Down

0 comments on commit 2efab45

Please sign in to comment.