1
1
zarr
2
2
====
3
3
4
- A minimal implementation of chunked, compressed, N-dimensional arrays for
5
- Python.
4
+ A minimal implementation of chunked, compressed, N-dimensional arrays
5
+ for Python.
6
6
7
7
* Source code: https://github.com/alimanfoo/zarr
8
8
* Download: https://pypi.python.org/pypi/zarr
@@ -13,8 +13,8 @@ Python.
13
13
Installation
14
14
------------
15
15
16
- Installation requires Numpy and Cython pre-installed. Can only be installed on
17
- Linux currently.
16
+ Installation requires Numpy and Cython pre-installed. Can only be
17
+ installed on Linux currently.
18
18
19
19
Install from PyPI::
20
20
@@ -27,8 +27,8 @@ Install from GitHub::
27
27
Status
28
28
------
29
29
30
- Experimental, proof-of-concept. This is alpha-quality software. Things may
31
- break, change or disappear without warning.
30
+ Experimental, proof-of-concept. This is alpha-quality software. Things
31
+ may break, change or disappear without warning.
32
32
33
33
Bug reports and suggestions welcome.
34
34
@@ -44,9 +44,7 @@ Design goals
44
44
Usage
45
45
-----
46
46
47
- Create an array
48
-
49
- .. code-block :: python
47
+ Create an array::
50
48
51
49
>>> import numpy as np
52
50
>>> import zarr
@@ -56,19 +54,15 @@ Create an array
56
54
cname: blosclz; clevel: 5; shuffle: 1 (BYTESHUFFLE)
57
55
nbytes: 38.1M; cbytes: 0; initialized: 0/100
58
56
59
- Fill it with some data
60
-
61
- .. code-block :: python
57
+ Fill it with some data::
62
58
63
59
>>> z[:] = np.arange(10000000, dtype='i4').reshape(10000, 1000)
64
60
>>> z
65
61
zarr.ext.SynchronizedArray((10000, 1000), int32, chunks=(1000, 100))
66
62
cname: blosclz; clevel: 5; shuffle: 1 (BYTESHUFFLE)
67
63
nbytes: 38.1M; cbytes: 2.0M; ratio: 19.3; initialized: 100/100
68
64
69
- Obtain a NumPy array by slicing
70
-
71
- .. code-block :: python
65
+ Obtain a NumPy array by slicing::
72
66
73
67
>>> z[:]
74
68
array([[ 0, 1, 2, ..., 997, 998, 999],
@@ -95,9 +89,7 @@ Obtain a NumPy array by slicing
95
89
[9998000, 9998001, 9998002, ..., 9998097, 9998098, 9998099],
96
90
[9999000, 9999001, 9999002, ..., 9999097, 9999098, 9999099]], dtype=int32)
97
91
98
- Resize the array and add more data
99
-
100
- .. code-block :: python
92
+ Resize the array and add more data::
101
93
102
94
>>> z.resize(20000, 1000)
103
95
>>> z
@@ -111,10 +103,10 @@ Resize the array and add more data
111
103
nbytes: 76.3M; cbytes: 4.0M; ratio: 19.3; initialized: 200/200
112
104
113
105
For convenience, an ``append() `` method is also available, which can be used to
114
- append data to any axis
115
-
116
- .. code-block :: python
106
+ append data to any axis:
117
107
108
+ .. code-block ::
109
+
118
110
>>> a = np.arange(10000000, dtype='i4').reshape(10000, 1000)
119
111
>>> z = zarr.array(a, chunks=(1000, 100))
120
112
>>> z.append(a+a)
0 commit comments