Skip to content

Commit 59f9239

Browse files
committed
doco
1 parent 36309eb commit 59f9239

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ Highly experimental, pre-alpha. Bug reports and pull requests very welcome.
1818
## Design goals
1919

2020
* Chunking in multiple dimensions
21+
* Resize any dimension
2122
* Concurrent reads
2223
* Concurrent writes
24+
* Release the GIL during compression and decompression
2325

2426
## Usage
2527

@@ -41,7 +43,7 @@ zarr.ext.Array((10000, 1000), int32, chunks=(1000, 100), nbytes=38.1M, cbytes=0,
4143
Fill it with some data:
4244

4345
```python
44-
>>> z[:] = np.arange(10000000, dtype='i4').reshape((10000, 1000))
46+
>>> z[:] = np.arange(10000000, dtype='i4').reshape(10000, 1000)
4547
>>> z
4648
zarr.ext.Array((10000, 1000), int32, chunks=(1000, 100), nbytes=38.1M, cbytes=2.0M, cratio=19.3, cname=blosclz, clevel=5, shuffle=1)
4749

@@ -73,6 +75,23 @@ zarr.ext.Array((20000, 1000), int32, chunks=(1000, 100), nbytes=76.3M, cbytes=4.
7375

7476
```
7577

78+
For convenience, an `append` method is available, which can be used to
79+
append data to any axis:
80+
81+
```python
82+
>>> a = np.arange(10000000, dtype='i4').reshape(10000, 1000)
83+
>>> z = zarr.array(a, chunks=(1000, 100))
84+
>>> z
85+
zarr.ext.Array((10000, 1000), int32, chunks=(1000, 100), nbytes=38.1M, cbytes=2.0M, cratio=19.3, cname=blosclz, clevel=5, shuffle=1)
86+
>>> z.append(a+a)
87+
>>> z
88+
zarr.ext.Array((20000, 1000), int32, chunks=(1000, 100), nbytes=76.3M, cbytes=3.6M, cratio=21.2, cname=blosclz, clevel=5, shuffle=1)
89+
>>> z.append(np.vstack([a, a]), axis=1)
90+
>>> z
91+
zarr.ext.Array((20000, 2000), int32, chunks=(1000, 100), nbytes=152.6M, cbytes=7.6M, cratio=20.2, cname=blosclz, clevel=5, shuffle=1)
92+
93+
```
94+
7695
## Tuning
7796

7897
``zarr`` is designed for use in parallel computations working chunk-wise
@@ -88,5 +107,5 @@ the correlation structure in your data.
88107
## Acknowledgments
89108

90109
``zarr`` uses [c-blosc](https://github.com/Blosc/c-blosc) internally for
91-
compression and decompression, and borrows code heavily from
110+
compression and decompression and borrows code heavily from
92111
[bcolz](http://bcolz.blosc.org/).

0 commit comments

Comments
 (0)