Skip to content

Commit

Permalink
bug: move consolidate metadata out of loop (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
tasansal committed Apr 4, 2024
1 parent 52e854d commit 12f2009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mdio/api/convenience.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def create_rechunk_plan(
)
)

zarr.consolidate_metadata(source.store)

n_dimension = len(data_array.shape)
dummy_array = zarr.empty_like(data_array, chunks=(MAX_BUFFER,) * n_dimension)
iterator = ChunkIterator(dummy_array)
Expand Down Expand Up @@ -202,8 +204,6 @@ def write_rechunked_values( # noqa: PLR0913
for array in data_arrs_out:
array[slice_] = source._traces[slice_]

zarr.consolidate_metadata(source.store)


def rechunk_batch(
source: MDIOAccessor,
Expand Down

0 comments on commit 12f2009

Please sign in to comment.