@@ -44,7 +44,7 @@ Fill it with some data::
44
44
zarr.ext.Array((10000, 1000), int32, chunks=(1000, 100), cname='blosclz', clevel=5, shuffle=1)
45
45
nbytes: 38.1M; cbytes: 2.0M; ratio: 19.3
46
46
47
- Obtain a NumPy array::
47
+ Obtain a NumPy array by slicing ::
48
48
49
49
>>> z[:]
50
50
array([[ 0, 1, 2, ..., 997, 998, 999],
@@ -54,6 +54,22 @@ Obtain a NumPy array::
54
54
[9997000, 9997001, 9997002, ..., 9997997, 9997998, 9997999],
55
55
[9998000, 9998001, 9998002, ..., 9998997, 9998998, 9998999],
56
56
[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)
57
73
58
74
Resize the array and add more data::
59
75
@@ -67,7 +83,7 @@ Resize the array and add more data::
67
83
nbytes: 76.3M; cbytes: 4.0M; ratio: 19.3
68
84
69
85
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::
71
87
72
88
>>> a = np.arange(10000000, dtype='i4').reshape(10000, 1000)
73
89
>>> z = zarr.array(a, chunks=(1000, 100))
0 commit comments