diff --git a/changes/4520.doc.md b/changes/4520.doc.md new file mode 100644 index 0000000000..1c3ad1a06d --- /dev/null +++ b/changes/4520.doc.md @@ -0,0 +1 @@ +Correct the docstrings of `zarr.save`, `zarr.save_array` and `zarr.save_group` to say the functions write to any store. Previously the docstrings stated the functions wrote to only the local file system, which was inaccurate. diff --git a/src/zarr/api/asynchronous.py b/src/zarr/api/asynchronous.py index 5725b3d13a..39e7cdd9d4 100644 --- a/src/zarr/api/asynchronous.py +++ b/src/zarr/api/asynchronous.py @@ -457,7 +457,7 @@ async def save( storage_options: dict[str, Any] | None = None, **kwargs: Any, # TODO: type kwargs as valid args to save ) -> None: - """Convenience function to save an array or group of arrays to the local file system. + """Convenience function to save an array or group of arrays to a store. Parameters ---------- @@ -504,7 +504,7 @@ async def save_array( storage_options: dict[str, Any] | None = None, **kwargs: Any, # TODO: type kwargs as valid args to create ) -> None: - """Convenience function to save a NumPy array to the local file system, following a + """Convenience function to save a NumPy array to a store, following a similar API to the NumPy save() function. Parameters @@ -559,7 +559,7 @@ async def save_group( storage_options: dict[str, Any] | None = None, **kwargs: NDArrayLike, ) -> None: - """Convenience function to save several NumPy arrays to the local file system, following a + """Convenience function to save several NumPy arrays to a store, following a similar API to the NumPy savez()/savez_compressed() functions. Parameters diff --git a/src/zarr/api/synchronous.py b/src/zarr/api/synchronous.py index 524f719742..b383085bda 100644 --- a/src/zarr/api/synchronous.py +++ b/src/zarr/api/synchronous.py @@ -263,7 +263,7 @@ def save( storage_options: dict[str, Any] | None = None, **kwargs: Any, # TODO: type kwargs as valid args to async_api.save ) -> None: - """Save an array or group of arrays to the local file system. + """Save an array or group of arrays to a store. Parameters ---------- @@ -304,7 +304,7 @@ def save_array( storage_options: dict[str, Any] | None = None, **kwargs: Any, # TODO: type kwargs as valid args to async_api.save_array ) -> None: - """Save a NumPy array to the local file system. + """Save a NumPy array to a store. Follows a similar API to the NumPy save() function. @@ -347,7 +347,7 @@ def save_group( storage_options: dict[str, Any] | None = None, **kwargs: NDArrayLike, ) -> None: - """Save several NumPy arrays to the local file system. + """Save several NumPy arrays to a store. Follows a similar API to the NumPy savez()/savez_compressed() functions.