imas.ids_struct_array.IDSStructArray¶
- class imas.ids_struct_array.IDSStructArray(parent: IDSBase, metadata: IDSMetadata)¶
Bases:
IDSBaseIDS array of structures (AoS) node
Represents a node in the IDS tree. Does not itself contain data, but contains references to IDSStructures
- __init__(parent: IDSBase, metadata: IDSMetadata)¶
Initialize IDSStructArray from XML specification
- Parameters:
- parent: IDSBase¶
Parent structure. Can be anything, but at database write time should be something with a path attribute
- metadata: IDSMetadata¶
IDSMetadata describing the structure of the IDS
Methods
__init__(parent, metadata)Initialize IDSStructArray from XML specification
append(elt)Append elements to the end of the array of structures.
resize(nbelt[, keep])Resize an array of structures.
Attributes
Metadata of this IDS node
Coordinates of this array of structures.
True if this struct-array has nonzero size
Get the shape of the contained data.
Get the number of elements in this array
- append(elt)¶
Append elements to the end of the array of structures.
- Parameters:
- elt¶
IDS structure, or list of IDS structures, to append to this array
- property coordinates¶
Coordinates of this array of structures.
- metadata : IDSMetadata¶
Metadata of this IDS node
- property shape : tuple[int]¶
Get the shape of the contained data.
This will always return a tuple:
(len(self), ).
- value¶