@@ -18,7 +18,7 @@ Zarr has several functions for creating arrays. For example::
18
18
>>> import zarr
19
19
>>> z = zarr.zeros((10000, 10000), chunks=(1000, 1000), dtype='i4')
20
20
>>> z
21
- <zarr.core. Array (10000, 10000) int32>
21
+ <zarr.Array (10000, 10000) int32>
22
22
23
23
The code above creates a 2-dimensional array of 32-bit integers with 10000 rows
24
24
and 10000 columns, divided into chunks where each chunk has 1000 rows and 1000
@@ -168,7 +168,7 @@ compression ratio. Zarr arrays provide a ``info`` property which can be used to
168
168
print some diagnostics, e.g.::
169
169
170
170
>>> z.info
171
- Type : zarr.core. Array
171
+ Type : zarr.Array
172
172
Data type : int32
173
173
Shape : (10000, 10000)
174
174
Chunk shape : (1000, 1000)
@@ -260,7 +260,7 @@ Here is an example using a delta filter with the Blosc compressor::
260
260
>>> data = np.arange(100000000, dtype='i4').reshape(10000, 10000)
261
261
>>> z = zarr.array(data, chunks=(1000, 1000), filters=filters, compressor=compressor)
262
262
>>> z.info
263
- Type : zarr.core. Array
263
+ Type : zarr.Array
264
264
Data type : int32
265
265
Shape : (10000, 10000)
266
266
Chunk shape : (1000, 1000)
@@ -302,15 +302,15 @@ Groups can also contain arrays, e.g.::
302
302
303
303
>>> z1 = bar.zeros('baz', shape=(10000, 10000), chunks=(1000, 1000), dtype='i4')
304
304
>>> z1
305
- <zarr.core. Array '/foo/bar/baz' (10000, 10000) int32>
305
+ <zarr.Array '/foo/bar/baz' (10000, 10000) int32>
306
306
307
307
Arrays are known as "datasets" in HDF5 terminology. For compatibility with h5py,
308
308
Zarr groups also implement the ``create_dataset() `` and ``require_dataset() ``
309
309
methods, e.g.::
310
310
311
311
>>> z = bar.create_dataset('quux', shape=(10000, 10000), chunks=(1000, 1000), dtype='i4')
312
312
>>> z
313
- <zarr.core. Array '/foo/bar/quux' (10000, 10000) int32>
313
+ <zarr.Array '/foo/bar/quux' (10000, 10000) int32>
314
314
315
315
Members of a group can be accessed via the suffix notation, e.g.::
316
316
@@ -323,7 +323,7 @@ call, e.g.::
323
323
>>> root['foo/bar']
324
324
<zarr.hierarchy.Group '/foo/bar'>
325
325
>>> root['foo/bar/baz']
326
- <zarr.core. Array '/foo/bar/baz' (10000, 10000) int32>
326
+ <zarr.Array '/foo/bar/baz' (10000, 10000) int32>
327
327
328
328
The :func: `zarr.hierarchy.Group.tree ` method can be used to print a tree
329
329
representation of the hierarchy, e.g.::
@@ -344,7 +344,7 @@ sub-directories, e.g.::
344
344
<zarr.hierarchy.Group '/'>
345
345
>>> z = root.zeros('foo/bar/baz', shape=(10000, 10000), chunks=(1000, 1000), dtype='i4')
346
346
>>> z
347
- <zarr.core. Array '/foo/bar/baz' (10000, 10000) int32>
347
+ <zarr.Array '/foo/bar/baz' (10000, 10000) int32>
348
348
349
349
Groups can be used as context managers (in a ``with `` statement).
350
350
If the underlying store has a ``close `` method, it will be called on exit.
@@ -388,7 +388,7 @@ property. E.g.::
388
388
389
389
>>> bar.info
390
390
Name : /foo/bar
391
- Type : zarr.core. Array
391
+ Type : zarr.Array
392
392
Data type : int64
393
393
Shape : (1000000,)
394
394
Chunk shape : (100000,)
@@ -403,7 +403,7 @@ property. E.g.::
403
403
404
404
>>> baz.info
405
405
Name : /foo/baz
406
- Type : zarr.core. Array
406
+ Type : zarr.Array
407
407
Data type : float32
408
408
Shape : (1000, 1000)
409
409
Chunk shape : (100, 100)
@@ -472,7 +472,7 @@ Note that although this functionality is similar to some of the advanced
472
472
indexing capabilities available on NumPy arrays and on h5py datasets, **the Zarr
473
473
API for advanced indexing is different from both NumPy and h5py **, so please
474
474
read this section carefully. For a complete description of the indexing API,
475
- see the documentation for the :class: `zarr.core. Array ` class.
475
+ see the documentation for the :class: `zarr.Array ` class.
476
476
477
477
Indexing with coordinate arrays
478
478
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -880,10 +880,10 @@ Here is an example using S3Map to read an array created previously::
880
880
>>> root = zarr.group(store=store)
881
881
>>> z = root['foo/bar/baz']
882
882
>>> z
883
- <zarr.core. Array '/foo/bar/baz' (21,) |S1>
883
+ <zarr.Array '/foo/bar/baz' (21,) |S1>
884
884
>>> z.info
885
885
Name : /foo/bar/baz
886
- Type : zarr.core. Array
886
+ Type : zarr.Array
887
887
Data type : |S1
888
888
Shape : (21,)
889
889
Chunk shape : (7,)
@@ -1150,7 +1150,7 @@ your array, then you can use an array with a fixed-length bytes dtype. E.g.::
1150
1150
1151
1151
>>> z = zarr.zeros(10, dtype='S6')
1152
1152
>>> z
1153
- <zarr.core. Array (10,) |S6>
1153
+ <zarr.Array (10,) |S6>
1154
1154
>>> z[0] = b'Hello'
1155
1155
>>> z[1] = b'world!'
1156
1156
>>> z[:]
@@ -1166,7 +1166,7 @@ A fixed-length unicode dtype is also available, e.g.::
1166
1166
>>> text_data = greetings * 10000
1167
1167
>>> z = zarr.array(text_data, dtype='U20')
1168
1168
>>> z
1169
- <zarr.core. Array (120000,) <U20>
1169
+ <zarr.Array (120000,) <U20>
1170
1170
>>> z[:]
1171
1171
array(['¡Hola mundo!', 'Hej Världen!', 'Servus Woid!', ...,
1172
1172
'Helló, világ!', 'Zdravo svete!', 'เฮลโลเวิลด์'],
@@ -1182,7 +1182,7 @@ E.g. using ``VLenUTF8``::
1182
1182
>>> import numcodecs
1183
1183
>>> z = zarr.array(text_data, dtype=object, object_codec=numcodecs.VLenUTF8())
1184
1184
>>> z
1185
- <zarr.core. Array (120000,) object>
1185
+ <zarr.Array (120000,) object>
1186
1186
>>> z.filters
1187
1187
[VLenUTF8()]
1188
1188
>>> z[:]
@@ -1194,7 +1194,7 @@ is a short-hand for ``dtype=object, object_codec=numcodecs.VLenUTF8()``, e.g.::
1194
1194
1195
1195
>>> z = zarr.array(text_data, dtype=str)
1196
1196
>>> z
1197
- <zarr.core. Array (120000,) object>
1197
+ <zarr.Array (120000,) object>
1198
1198
>>> z.filters
1199
1199
[VLenUTF8()]
1200
1200
>>> z[:]
@@ -1210,7 +1210,7 @@ e.g.::
1210
1210
>>> bytes_data = [g.encode('utf-8') for g in greetings] * 10000
1211
1211
>>> z = zarr.array(bytes_data, dtype=bytes)
1212
1212
>>> z
1213
- <zarr.core. Array (120000,) object>
1213
+ <zarr.Array (120000,) object>
1214
1214
>>> z.filters
1215
1215
[VLenBytes()]
1216
1216
>>> z[:]
@@ -1225,7 +1225,7 @@ integer. E.g.::
1225
1225
>>> categorize = numcodecs.Categorize(greetings, dtype=object)
1226
1226
>>> z = zarr.array(text_data, dtype=object, object_codec=categorize)
1227
1227
>>> z
1228
- <zarr.core. Array (120000,) object>
1228
+ <zarr.Array (120000,) object>
1229
1229
>>> z.filters
1230
1230
[Categorize(dtype='|O', astype='|u1', labels=['¡Hola mundo!', 'Hej Världen!', 'Servus Woid!', ...])]
1231
1231
>>> z[:]
@@ -1275,7 +1275,7 @@ and stores the same primitive type (a.k.a. a ragged array), the
1275
1275
1276
1276
>>> z = zarr.empty(4, dtype=object, object_codec=numcodecs.VLenArray(int))
1277
1277
>>> z
1278
- <zarr.core. Array (4,) object>
1278
+ <zarr.Array (4,) object>
1279
1279
>>> z.filters
1280
1280
[VLenArray(dtype='<i8')]
1281
1281
>>> z[0] = np.array([1, 3, 5])
@@ -1291,7 +1291,7 @@ primitive dtype such as 'i4' or 'f8'. E.g.::
1291
1291
1292
1292
>>> z = zarr.empty(4, dtype='array:i8')
1293
1293
>>> z
1294
- <zarr.core. Array (4,) object>
1294
+ <zarr.Array (4,) object>
1295
1295
>>> z.filters
1296
1296
[VLenArray(dtype='<i8')]
1297
1297
>>> z[0] = np.array([1, 3, 5])
@@ -1367,7 +1367,7 @@ ratios, depending on the correlation structure within the data. E.g.::
1367
1367
>>> a = np.arange(100000000, dtype='i4').reshape(10000, 10000).T
1368
1368
>>> c = zarr.array(a, chunks=(1000, 1000))
1369
1369
>>> c.info
1370
- Type : zarr.core. Array
1370
+ Type : zarr.Array
1371
1371
Data type : int32
1372
1372
Shape : (10000, 10000)
1373
1373
Chunk shape : (1000, 1000)
@@ -1381,7 +1381,7 @@ ratios, depending on the correlation structure within the data. E.g.::
1381
1381
Chunks initialized : 100/100
1382
1382
>>> f = zarr.array(a, chunks=(1000, 1000), order='F')
1383
1383
>>> f.info
1384
- Type : zarr.core. Array
1384
+ Type : zarr.Array
1385
1385
Data type : int32
1386
1386
Shape : (10000, 10000)
1387
1387
Chunk shape : (1000, 1000)
@@ -1549,7 +1549,7 @@ with thread synchronization::
1549
1549
>>> z = zarr.zeros((10000, 10000), chunks=(1000, 1000), dtype='i4',
1550
1550
... synchronizer=zarr.ThreadSynchronizer())
1551
1551
>>> z
1552
- <zarr.core. Array (10000, 10000) int32>
1552
+ <zarr.Array (10000, 10000) int32>
1553
1553
1554
1554
This array is safe to read or write within a multi-threaded program.
1555
1555
@@ -1563,7 +1563,7 @@ some networked file systems). E.g.::
1563
1563
... chunks=(1000, 1000), dtype='i4',
1564
1564
... synchronizer=synchronizer)
1565
1565
>>> z
1566
- <zarr.core. Array (10000, 10000) int32>
1566
+ <zarr.Array (10000, 10000) int32>
1567
1567
1568
1568
This array is safe to read or write from multiple processes.
1569
1569
@@ -1631,7 +1631,7 @@ arrays, as long as the units are specified. E.g.::
1631
1631
1632
1632
>>> z = zarr.array(['2007-07-13', '2006-01-13', '2010-08-13'], dtype='M8[D]')
1633
1633
>>> z
1634
- <zarr.core. Array (3,) datetime64[D]>
1634
+ <zarr.Array (3,) datetime64[D]>
1635
1635
>>> z[:]
1636
1636
array(['2007-07-13', '2006-01-13', '2010-08-13'], dtype='datetime64[D]')
1637
1637
>>> z[0]
0 commit comments