Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion src/zarr/core/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2729,6 +2729,8 @@ def array(
Whether to overwrite an array with the same name in the store, if one exists.
config : ArrayConfig or ArrayConfigLike, optional
Runtime configuration for the array.
data : array_like
The data to fill the array with.

Returns
-------
Expand All @@ -2737,7 +2739,7 @@ def array(
compressors = _parse_deprecated_compressor(compressor, compressors)
return Array(
self._sync(
self._async_group.create_array(
self._async_group.create_dataset(
name=name,
shape=shape,
dtype=dtype,
Expand All @@ -2754,6 +2756,7 @@ def array(
overwrite=overwrite,
storage_options=storage_options,
config=config,
data=data,
)
)
)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,7 @@ def test_group_create_array(
array[:] = data
elif method == "array":
with pytest.warns(DeprecationWarning):
array = group.array(name="array", shape=shape, dtype=dtype)
array[:] = data
array = group.array(name="array", data=data, shape=shape, dtype=dtype)
else:
raise AssertionError

Expand Down
Loading