MCPcopy Create free account
hub / github.com/PyTables/PyTables / create_carray

Method create_carray

tables/file.py:1239–1372  ·  view source on GitHub ↗

Create a new chunked 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`). na

(
        self,
        where: Group | str,
        name: str,
        atom: Atom | None = None,
        shape: tuple[int, ...] | None = None,
        title: str = "",
        filters: Filters | None = None,
        chunkshape: int | tuple[int, ...] | None = None,
        byteorder: str | None = None,
        createparents: bool = False,
        obj: np.ndarray | None = None,
        track_times: bool = True,
    )

Source from the content-addressed store, hash-verified

1237 )
1238
1239 def create_carray(
1240 self,
1241 where: Group | str,
1242 name: str,
1243 atom: Atom | None = None,
1244 shape: tuple[int, ...] | None = None,
1245 title: str = "",
1246 filters: Filters | None = None,
1247 chunkshape: int | tuple[int, ...] | None = None,
1248 byteorder: str | None = None,
1249 createparents: bool = False,
1250 obj: np.ndarray | None = None,
1251 track_times: bool = True,
1252 ) -> CArray:
1253 """Create a new chunked array.
1254
1255 Parameters
1256 ----------
1257 where : str or Group
1258 The parent group from which the new array will hang. It can
1259 be a path string (for example '/level1/leaf5'), or a Group
1260 instance (see :ref:`GroupClassDescr`).
1261 name : str
1262 The name of the new array
1263 atom : Atom
1264 An Atom (see :ref:`AtomClassDescr`) instance representing
1265 the *type* and *shape* of the atomic objects to be saved.
1266
1267 .. versionchanged:: 3.0
1268 The *atom* parameter can be None (default) if *obj* is
1269 provided.
1270
1271 shape : tuple
1272 The shape of the new array.
1273
1274 .. versionchanged:: 3.0
1275 The *shape* parameter can be None (default) if *obj* is
1276 provided.
1277
1278 title : str, optional
1279 A description for this node (it sets the TITLE HDF5 attribute
1280 on disk).
1281 filters : Filters, optional
1282 An instance of the Filters class (see :ref:`FiltersClassDescr`)
1283 that provides information about the desired I/O filters to
1284 be applied during the life of this object.
1285 chunkshape : tuple or number or None, optional
1286 The shape of the data chunk to be read or written in a
1287 single HDF5 I/O operation. Filters are applied to those
1288 chunks of data. The dimensionality of chunkshape must be
1289 the same as that of shape. If None, a sensible value is
1290 calculated (which is recommended).
1291 byteorder : str, optional
1292 The byteorder of the data *on disk*, specified as 'little'
1293 or 'big'. If this is not specified, the byteorder is that
1294 of the given object.
1295 createparents : bool, optional
1296 Whether to create the needed groups for the parent path to

Callers 15

expression.pyFile · 0.80
make_test_fileFunction · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
test00_simpleMethod · 0.80
test01_iterMethod · 0.80
_add_datasetsMethod · 0.80
write_carrayFunction · 0.80
setUpMethod · 0.80
populateFileMethod · 0.80
create_arrayMethod · 0.80
create_arrayMethod · 0.80

Calls 6

_get_or_create_pathMethod · 0.95
flavor_ofFunction · 0.85
array_as_internalFunction · 0.85
_checkfiltersFunction · 0.85
CArrayClass · 0.85
from_dtypeMethod · 0.45

Tested by 15

setUpMethod · 0.64
setUpMethod · 0.64
test00_simpleMethod · 0.64
test01_iterMethod · 0.64
_add_datasetsMethod · 0.64
setUpMethod · 0.64
populateFileMethod · 0.64
create_arrayMethod · 0.64
create_arrayMethod · 0.64
test01a_StringMethod · 0.64
test01b_StringMethod · 0.64
test02a_intMethod · 0.64