-
-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix create_dataset with data kwarg #2638
Conversation
Just to clarify... Is it intended that this change was only added to the deprecated So we shouldn't expect this to be around too long and should migrate to doing this:
|
Yes, I would recommend that. |
we should definitely have a group-level method that lets people create + fill an array from an existing array. |
Maybe |
that would be a perfect fit, but |
|
Not from my end. This was just what I needed to get the napari tests passing.
I would find this confusing. |
The issue is that |
What length of deprecation cycle would you recommend? |
minimum 6mo but preferably 24mo. (The latter being in line with SPEC0.) |
Thanks. I could get behind that but I think we need to have a discussion. I could also see different deprecation time scales for different APIs within the library. |
Closes #2631
create_dataset
is a legacy method for zarr v2 compatibility to help librariesmigrate to zarr v3. #2463 was a little overenthusiastic about the capabilities
of the new
create_array
method 😂 and missed one of the kwargs ofcreate_dataset
. This PR adds special handling of the data kwarg beforepassing the remaining arguments to
create_array
.I also added special handling of the dtype kwarg because it is optional in 2.x
if data is passed. (For some reason, shape is not optional, and I thought
about fixing it but it seems pointless because the function is going to be
removed anyway, so we don't want to add new conveniences to it.)
TODO:
Add docstrings and API docs for any new/modified user-facing classes and functionsNew/modified features documented in docs/tutorial.rstChanges documented in docs/release.rst