PyTables User's Guide: Hierarchical datasets in Python - Release 1.3.2 | ||
---|---|---|
Prev | Chapter 4. Library Reference | Next |
The goal of this class is to provide a place to put common functionality of all its descendants as well as provide a way to help classifying objects on the tree. A Leaf object is an end-node, that is, a node that can hang directly from a group object, but that is not a group itself and, thus, it can not have descendants. Right now, the set of end-nodes is composed by Table, Array, CArray, EArray, VLArray and UnImplemented class instances. In fact, all the previous classes inherit from the Leaf class.
These instance variables are provided in addition to those in Node (see 4.3).
The shape of data in the leaf.
The byte ordering of data in the leaf.
Filter properties for this leaf —see 4.17.1.
The name of this node in its parent group (a string). An alias for Node._v_name.
The name of this node in the hosting HDF5 file (a string). An alias for Node._v_hdf5name.
The identifier of this node in the hosting HDF5 file. An alias for Node._v_objectID.
The associated AttributeSet instance (see 4.15). An alias for Node._v_attrs.
A description for this node. An alias for Node._v_title.
Flush pending data to disk.
Saves whatever remaining buffered data to disk. It also releases I/O buffers, so, if you are filling many objects (i.e. tables) in the same PyTables session, please, call flush() extensively so as to help PyTables to keep memory requirements low.
Close this node in the tree.
This method has the behavior described in Node._f_close() (see [here]). Besides that, the optional argument flush tells whether to flush pending data to disk or not before closing.
Close this node in the tree.
This method is completely equivalent to _f_close().
Remove this node from the hierarchy.
This method has the behavior described in Node._f_remove() (see [here]). Please, note that there is no recursive flag since leaves do not have child nodes.
Copy this node and return the new one.
This method has the behavior described in Node._f_copy() (see [here]). Please, note that there is no recursive flag since leaves do not have child nodes. In addition, this method recognizes the following keyword arguments:
The new title for the destination. If omitted or None, the original title is used.
Specifying this parameter overrides the original filter properties in the source node. If specified, it must be an instance of the Filters class (see section 4.17.1). The default is to copy the filter properties from the source node.
You can prevent the user attributes from being copied by setting this parameter to False. The default is to copy them.
Specify the range of rows in child leaves to be copied; the default is to copy all the rows.
This argument may be used to collect statistics on the copy process. When used, it should be a dictionary with keys 'groups', 'leaves' and 'bytes' having a numeric value. Their values will be incremented to reflect the number of groups, leaves and bytes, respectively, that have been copied during the operation.
Rename this node in place.
This method has the behavior described in Node._f_rename() (see [here]).
Move or rename this node.
This method has the behavior described in Node._f_move() (see [here]).
Is this node visible?
This method has the behavior described in Node._f_isVisible() (see [here]).
Get a PyTables attribute from this node.
This method has the behavior described in Node._f_getAttr() (see [here]).
Set a PyTables attribute for this node.
This method has the behavior described in Node._f_setAttr() (see [here]).
Delete a PyTables attribute from this node.
This method has the behavior described in Node._f_delAttr() (see [here]).