Create a new enlargeable array. Parameters ---------- where : str or Group The parent group from which the new array will hang. It can be a path string (for example '/level1/leaf5'), or a Group instance (see :ref:`GroupClassDescr`).
(
self,
where: Group | str,
name: str,
atom: Atom | None = None,
shape: tuple[int, ...] | None = None,
title: str = "",
filters: Filters | None = None,
expectedrows: int = 1000,
chunkshape: int | tuple[int, ...] | None = None,
byteorder: str | None = None,
createparents: bool = False,
obj: np.ndarray | None = None,
track_times: bool = True,
)
| 1372 | return ptobj |
| 1373 | |
| 1374 | def create_earray( |
| 1375 | self, |
| 1376 | where: Group | str, |
| 1377 | name: str, |
| 1378 | atom: Atom | None = None, |
| 1379 | shape: tuple[int, ...] | None = None, |
| 1380 | title: str = "", |
| 1381 | filters: Filters | None = None, |
| 1382 | expectedrows: int = 1000, |
| 1383 | chunkshape: int | tuple[int, ...] | None = None, |
| 1384 | byteorder: str | None = None, |
| 1385 | createparents: bool = False, |
| 1386 | obj: np.ndarray | None = None, |
| 1387 | track_times: bool = True, |
| 1388 | ) -> EArray: |
| 1389 | """Create a new enlargeable array. |
| 1390 | |
| 1391 | Parameters |
| 1392 | ---------- |
| 1393 | where : str or Group |
| 1394 | The parent group from which the new array will hang. It can be a |
| 1395 | path string (for example '/level1/leaf5'), or a Group instance |
| 1396 | (see :ref:`GroupClassDescr`). |
| 1397 | name : str |
| 1398 | The name of the new array |
| 1399 | atom : Atom |
| 1400 | An Atom (see :ref:`AtomClassDescr`) instance representing the |
| 1401 | *type* and *shape* of the atomic objects to be saved. |
| 1402 | |
| 1403 | .. versionchanged:: 3.0 |
| 1404 | The *atom* parameter can be None (default) if *obj* is |
| 1405 | provided. |
| 1406 | |
| 1407 | shape : tuple |
| 1408 | The shape of the new array. One (and only one) of the shape |
| 1409 | dimensions *must* be 0. The dimension being 0 means that the |
| 1410 | resulting EArray object can be extended along it. Multiple |
| 1411 | enlargeable dimensions are not supported right now. |
| 1412 | |
| 1413 | .. versionchanged:: 3.0 |
| 1414 | The *shape* parameter can be None (default) if *obj* is |
| 1415 | provided. |
| 1416 | |
| 1417 | title : str, optional |
| 1418 | A description for this node (it sets the TITLE HDF5 attribute on |
| 1419 | disk). |
| 1420 | filters : Filters, optional |
| 1421 | An instance of the Filters class (see :ref:`FiltersClassDescr`) |
| 1422 | that provides information about the desired I/O filters to |
| 1423 | be applied during the life of this object. |
| 1424 | expectedrows : int, optional |
| 1425 | A user estimate about the number of row elements that will be added |
| 1426 | to the growable dimension in the EArray node. If not provided, the |
| 1427 | default value is EXPECTED_ROWS_EARRAY (see tables/parameters.py). |
| 1428 | If you plan to create either a much smaller or a much bigger array |
| 1429 | try providing a guess; this will optimize the HDF5 B-Tree creation |
| 1430 | and management process time and the amount of memory used. |
| 1431 | chunkshape : tuple, numeric, or None, optional |