You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart.rst
+79-42Lines changed: 79 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,12 @@
10
10
Quickstart
11
11
==========
12
12
13
-
Welcome to the Zarr-Python Quickstart guide! This page will help you get up and running with the Zarr library in Python to efficiently manage and analyze multi-dimensional arrays.
13
+
Welcome to the Zarr-Python Quickstart guide! This page will help you get up and running with
14
+
the Zarr library in Python to efficiently manage and analyze multi-dimensional arrays.
14
15
15
-
Zarr is a powerful library for storage of n-dimensional arrays, supporting chunking, compression, and various backends, making it a versatile choice for scientific and large-scale data.
16
+
Zarr is a powerful library for storage of n-dimensional arrays, supporting chunking,
17
+
compression, and various backends, making it a versatile choice for scientific and
18
+
large-scale data.
16
19
17
20
Installation
18
21
------------
@@ -32,102 +35,136 @@ or `conda`:
32
35
Creating an Array
33
36
-----------------
34
37
35
-
To get started, you can create a simple Zarr array using the in-memory store:
38
+
To get started, you can create a simple Zarr array:
36
39
37
40
.. ipython:: python
38
41
39
42
import zarr
40
43
import numpy as np
41
44
42
45
# Create a 2D Zarr array
43
-
z = zarr.zeros((100, 100), chunks=(10, 10), dtype='f4')
46
+
z = zarr.zeros(
47
+
store="data/example-1.zarr",
48
+
shape=(100, 100),
49
+
chunks=(10, 10),
50
+
dtype="f4"
51
+
)
44
52
45
53
# Assign data to the array
46
54
z[:, :] = np.random.random((100, 100))
55
+
z.info
47
56
48
-
print(z.info)
49
-
50
-
Here, we created a 2D array of shape ``(100, 100)``, chunked into blocks of ``(10, 10)``, and filled it with random floating-point data.
57
+
Here, we created a 2D array of shape ``(100, 100)``, chunked into blocks of
58
+
``(10, 10)``, and filled it with random floating-point data. This array was
59
+
written to a ``LocalStore`` in the ``data/example-1.zarr`` directory.
51
60
52
-
Persistent Storage
53
-
------------------
61
+
Compression and Filters
62
+
~~~~~~~~~~~~~~~~~~~~~~~
54
63
55
-
Zarr supports persistent storage to disk or cloud-compatible backends. To store arrays on the filesystem:
64
+
Zarr supports data compression and filters. For example, to use Blosc compression:
0 commit comments