@@ -14,8 +14,7 @@ flexibility.
14
14
Creating an array
15
15
-----------------
16
16
17
- Zarr has a number of convenience functions for creating arrays. For
18
- example::
17
+ Zarr has several functions for creating arrays. For example::
19
18
20
19
>>> import zarr
21
20
>>> z = zarr.zeros((10000, 10000), chunks=(1000, 1000), dtype='i4')
@@ -101,7 +100,10 @@ Check that the data have been written and can be read again::
101
100
True
102
101
103
102
Please note that there are a number of other options for persistent
104
- array storage, see the section on :ref: `tutorial_tips_storage ` below.
103
+ array storage, see the section on :ref: `tutorial_tips_storage `
104
+ below. Also, if you are just looking for a convenient way to save
105
+ NumPy arrays to disk then load back into memory later, see the
106
+ functions :func: `zarr.save ` and :func: `zarr.load `.
105
107
106
108
.. _tutorial_resize :
107
109
@@ -744,9 +746,7 @@ interface as the store for a group or an array. Some storage classes
744
746
are provided in the :mod: `zarr.storage ` module. For example, the
745
747
:class: `zarr.storage.DirectoryStore ` class provides a
746
748
``MutableMapping `` interface to a directory on the local file
747
- system. This is used under the hood by the
748
- :func: `zarr.creation.open_array ` and :func: `zarr.hierarchy.open_group `
749
- functions.
749
+ system. This is used under the hood by the :func: `zarr.open ` function.
750
750
751
751
In other words, the following code::
752
752
@@ -755,7 +755,7 @@ In other words, the following code::
755
755
...is just a convenient short-hand for::
756
756
757
757
>>> store = zarr.DirectoryStore('example.zarr')
758
- >>> z = zarr.zeros (store=store, overwrite=True, shape=1000000, dtype='i4')
758
+ >>> z = zarr.create (store=store, overwrite=True, shape=1000000, dtype='i4')
759
759
760
760
...and the following code::
761
761
@@ -767,8 +767,8 @@ In other words, the following code::
767
767
>>> grp = zarr.group(store=store, overwrite=True)
768
768
769
769
Any other storage class could be used in place of
770
- :class: `zarr.storage.DirectoryStore `. For example, here is an array
771
- stored directly into a zip file::
770
+ :class: `zarr.storage.DirectoryStore ` in the code examples above. For
771
+ example, here is an array stored directly into a Zip file::
772
772
773
773
>>> store = zarr.ZipStore('example.zip', mode='w')
774
774
>>> root_group = zarr.group(store=store)
0 commit comments