Skip to content

Commit

Permalink
fix: only copy metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Nov 13, 2023
1 parent 2da78b4 commit 08c48c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dask_awkward/lib/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,15 @@ def combinations(

@borrow_docstring(ak.copy)
def copy(array: Array) -> Array:
# Make a copy of meta, but don't try and copy the layout;
# dask-awkward's copy is metadata-only
old_meta = array._meta
new_meta = ak.Array(old_meta.layout, behavior=deepcopy(old_meta._behavior))

return Array(
array._dask,
array._name,
deepcopy(array._meta),
new_meta,
array._divisions,
)

Expand Down

0 comments on commit 08c48c6

Please sign in to comment.