MCPcopy Index your code
hub / github.com/PyTables/PyTables / Array

Class Array

tables/array.py:41–980  ·  view source on GitHub ↗

This class represents homogeneous datasets in an HDF5 file. This class provides methods to write or read data to or from array objects in the file. This class does not allow you neither to enlarge nor compress the datasets on disk; use the EArray class (see :ref:`EArrayClassDescr`) if

Source from the content-addressed store, hash-verified

39
40
41class Array(hdf5extension.Array, Leaf):
42 """This class represents homogeneous datasets in an HDF5 file.
43
44 This class provides methods to write or read data to or from array objects
45 in the file. This class does not allow you neither to enlarge nor compress
46 the datasets on disk; use the EArray class (see :ref:`EArrayClassDescr`) if
47 you want enlargeable dataset support or compression features, or CArray
48 (see :ref:`CArrayClassDescr`) if you just want compression.
49
50 An interesting property of the Array class is that it remembers the
51 *flavor* of the object that has been saved so that if you saved, for
52 example, a list, you will get a list during readings afterwards; if you
53 saved a NumPy array, you will get a NumPy object, and so forth.
54
55 Note that this class inherits all the public attributes and methods that
56 Leaf (see :ref:`LeafClassDescr`) already provides. However, as Array
57 instances have no internal I/O buffers, it is not necessary to use the
58 flush() method they inherit from Leaf in order to save their internal state
59 to disk. When a writing method call returns, all the data is already on
60 disk.
61
62 Parameters
63 ----------
64 parentnode
65 The parent :class:`Group` object.
66
67 .. versionchanged:: 3.0
68 Renamed from *parentNode* to *parentnode*
69
70 name : str
71 The name of this node in its parent group.
72 obj
73 The array or scalar to be saved. Accepted types are NumPy
74 arrays and scalars as well as native Python sequences and
75 scalars, provided that values are regular (i.e. they are not
76 like ``[[1,2],2]``) and homogeneous (i.e. all the elements are
77 of the same type).
78
79 .. versionchanged:: 3.0
80 Renamed from *object* into *obj*.
81 title
82 A description for this node (it sets the ``TITLE`` HDF5 attribute on
83 disk).
84 byteorder
85 The byteorder of the data *on disk*, specified as 'little' or 'big'.
86 If this is not specified, the byteorder is that of the given `object`.
87 track_times
88 Whether time data associated with the leaf are recorded (object
89 access time, raw data modification time, metadata change time, object
90 birth time); default True. Semantics of these times depend on their
91 implementation in the HDF5 library: refer to documentation of the
92 H5O_info_t data structure. As of HDF5 1.8.15, only ctime (metadata
93 change time) is implemented.
94
95 .. versionadded:: 3.4.3
96
97 """
98

Callers 2

_g_copy_with_statsMethod · 0.85
create_arrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected