traveler.core.omx.OMX#
- class traveler.core.omx.OMX(filename=None, mode='r', **kwarg)[source]#
Bases:
objectA class for handling openmatrix files using h5py.
As suggested in the openmatrix documentation, the default when creating an OMX file is to use gzip compression level 1, although this can be overridden.
- Parameters:
filename (str | PathLike | Path | None)
mode (str)
Methods#
|
Add a blank lookup to the OMX file. |
|
Add a blank matrix to the OMX file. |
|
Add a lookup mapping to the OMX file. |
|
Add a matrix to the OMX file. |
|
Get the value from all matrices at a coordinate. |
|
Change every matrix and lookup with a matching data type. |
|
Change the data type of a named matrix or lookup. |
|
Change the file mode of the underlying HDF5 file. |
|
Close the HDF5 file. |
|
Get a matrix array as a pandas.DataFrame. |
|
Return a cached positional mapping for a lookup dataset. |
|
Get the names of data and/or lookup stored in this file. |
|
Convert an array of lookup-able values into indexes. |
|
Convert the OMX file to a dictionary of dask arrays. |
|
Convert matrices and compatible lookups to an xarray dataset. |
|
Load OMX matrices into JAX arrays grouped by time period. |
|
Convert the OMX file to a dictionary of 3D numpy arrays. |