read#
- _HdfArray.read(*args, unit=None, mesh=None, order=None, scales=False)[source]#
Read data by index with optional unit conversion.
Attention
When reading/slicing data, the
*argsare always supplied in physical (e.g. \((r, \theta, \phi)\)) order. However, unless specified with theorderargument, the sliced data array will be returned in storage order.Attention
The
scalesargument is only functional on the main data array reader (_HdfData). It is accepted by scale readers (_HdfScale) for pass-through compatibility but has no effect there.- Parameters:
- *args
int|tuple|slice|None Index-space axis arguments in physical
(r, t, p)order.- unit
UnitLike|None, optional Output unit. Default is
None(code units).- mesh
MeshLike|None, optional Target stagger mesh. Default is
None(no remeshing).- order
ArrayOrdering|None, optional Transpose the output if it differs from storage order. Default is
None.- scalesbool, optional
If
True(default), return coordinate slices alongside data.
- *args
- Returns:
Examples
>>> data, = reader.read(scales=True)