Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/zarr/core/buffer/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
order: Literal["C", "F"] = "C",
fill_value: Any | None = None,
) -> Self:
if fill_value is None:
if fill_value is None or fill_value == 0:

Check warning on line 157 in src/zarr/core/buffer/cpu.py

View check run for this annotation

Codecov / codecov/patch

src/zarr/core/buffer/cpu.py#L157

Added line #L157 was not covered by tests
return cls(np.zeros(shape=tuple(shape), dtype=dtype, order=order))
else:
return cls(np.full(shape=tuple(shape), fill_value=fill_value, dtype=dtype, order=order))
Expand Down
Loading