Skip to content

Commit 83ddb6b

Browse files
committed
doco
1 parent 73c1ea4 commit 83ddb6b

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Fill it with some data::
4444
zarr.ext.Array((10000, 1000), int32, chunks=(1000, 100), cname='blosclz', clevel=5, shuffle=1)
4545
nbytes: 38.1M; cbytes: 2.0M; ratio: 19.3
4646

47-
Obtain a NumPy array::
47+
Obtain a NumPy array by slicing::
4848

4949
>>> z[:]
5050
array([[ 0, 1, 2, ..., 997, 998, 999],
@@ -54,6 +54,22 @@ Obtain a NumPy array::
5454
[9997000, 9997001, 9997002, ..., 9997997, 9997998, 9997999],
5555
[9998000, 9998001, 9998002, ..., 9998997, 9998998, 9998999],
5656
[9999000, 9999001, 9999002, ..., 9999997, 9999998, 9999999]], dtype=int32)
57+
>>> z[:100]
58+
array([[ 0, 1, 2, ..., 997, 998, 999],
59+
[ 1000, 1001, 1002, ..., 1997, 1998, 1999],
60+
[ 2000, 2001, 2002, ..., 2997, 2998, 2999],
61+
...,
62+
[97000, 97001, 97002, ..., 97997, 97998, 97999],
63+
[98000, 98001, 98002, ..., 98997, 98998, 98999],
64+
[99000, 99001, 99002, ..., 99997, 99998, 99999]], dtype=int32)
65+
>>> z[:, :100]
66+
array([[ 0, 1, 2, ..., 97, 98, 99],
67+
[ 1000, 1001, 1002, ..., 1097, 1098, 1099],
68+
[ 2000, 2001, 2002, ..., 2097, 2098, 2099],
69+
...,
70+
[9997000, 9997001, 9997002, ..., 9997097, 9997098, 9997099],
71+
[9998000, 9998001, 9998002, ..., 9998097, 9998098, 9998099],
72+
[9999000, 9999001, 9999002, ..., 9999097, 9999098, 9999099]], dtype=int32)
5773

5874
Resize the array and add more data::
5975

@@ -67,7 +83,7 @@ Resize the array and add more data::
6783
nbytes: 76.3M; cbytes: 4.0M; ratio: 19.3
6884

6985
For convenience, an `append` method is also available, which can be used to
70-
append data to any axis:
86+
append data to any axis::
7187

7288
>>> a = np.arange(10000000, dtype='i4').reshape(10000, 1000)
7389
>>> z = zarr.array(a, chunks=(1000, 100))

0 commit comments

Comments
 (0)