Skip to content

Commit

Permalink
materialize should keep the parameters in the new NumpyArray
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrommyd committed Feb 12, 2025
1 parent 80130f2 commit 9bc1a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/awkward/operations/ak_materialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def action(layout, backend, **kwargs):
out = buffer.materialize()
else:
out = buffer
return ak.contents.NumpyArray(out)
return ak.contents.NumpyArray(out, parameters=layout.parameters)
else:
return None

Expand Down
2 changes: 1 addition & 1 deletion src/awkward/operations/ak_to_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _impl(array, allow_missing):
import numpy # noqa: TID251

with numpy.errstate(invalid="ignore"):
layout = ak.to_layout(array, allow_record=False)
layout = ak.to_layout(ak.operations.materialize(array), allow_record=False)

backend = NumpyBackend.instance()
numpy_layout = layout.to_backend(backend)
Expand Down

0 comments on commit 9bc1a63

Please sign in to comment.