zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

fix:*-like creation routines take kwargs

Open d-v-b opened this issue 8 months ago • 2 comments

In main, array creation routines that take an existing array, like full_like, zeros_like, etc, don't allow users to override certain array properties (like shape and dtype) via keyword arguments. E.g., full_like(arr, shape=(10,)) will ignore the shape keyword argument and produce an array with the same shape as arr.

This PR makes these array creation routines sensitive to keyword arguments like shape, dtype, chunks, etc.

closes https://github.com/zarr-developers/zarr-python/issues/2989

d-v-b avatar Apr 17 '25 01:04 d-v-b

requesting review from @jhamman since I think you touched this code most recently

d-v-b avatar Apr 20 '25 19:04 d-v-b

our upstream tests are failing because fsspec and s3fs tips are incompatible. this failure has nothing to do with this PR.

d-v-b avatar May 23 '25 12:05 d-v-b

Codecov Report

:x: Patch coverage is 64.28571% with 10 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 61.24%. Comparing base (6805332) to head (4186442). :warning: Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/zarr/api/asynchronous.py 64.28% 10 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2992      +/-   ##
==========================================
+ Coverage   61.23%   61.24%   +0.01%     
==========================================
  Files          83       83              
  Lines        9897     9907      +10     
==========================================
+ Hits         6060     6068       +8     
- Misses       3837     3839       +2     
Files with missing lines Coverage Δ
src/zarr/api/asynchronous.py 72.20% <64.28%> (+0.27%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 17 '25 21:09 codecov[bot]