_HdfArray#
- class _HdfArray(*args, cache='lazy', **kwargs)[source]#
Bases:
ABCAbstract base class for a single HDF dataset with optional caching.
Provides the common interface for both data arrays (
_HdfData) and coordinate scale arrays (_HdfScale). Concrete subclasses supply the HDF-version-specific implementations of the abstract properties (_shape,dtype,size,nbytes,ndim,attrs) and the_dataset()factory.Subclasses must not be instantiated directly. Use
PsiData()or the concrete classesH4Data,H5Data,H4Scale, andH5Scale.- Attributes:
- _vcache
np.ndarray|None In-memory copy of the full dataset array, or
Nonewhen not cached.- _cache
CacheType Active cache mode:
'lazy','eager', orNone.
- _vcache
Methods
|
Release the in-memory data cache. |
|
Load the full dataset into the in-memory cache. |
|
Read data by index with optional unit conversion. |
|
Return the HDF dataset or sub-dataset identified by id_. |
|
Alias for |
Validate resolved metadata and emit |
Properties
HDF dataset-level attributes as a plain Python dictionary. |
|
Active cache mode. |
|
Alias for |
|
Whether the full data array is currently held in memory. |
|
The primary HDF dataset object for this reader. |
|
Human-readable description of the physical quantity. |
|
Element data type of the HDF dataset. |
|
Yee-grid stagger code for this dataset. |
|
Canonical lower-case quantity identifier. |
|
Dataset size in bytes. |
|
Number of spatial dimensions in the dataset. |
|
Memory layout of the stored array. |
|
Array shape in physical |
|
Total number of elements in the dataset. |
|
Astropy unit for converting from code units to physical units. |