Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
uv pip install "black==22.12.0" "coveralls>=4" \
"cytoolz==0.12.2" "dask>=2026" "isort>=5.12.0" \
"multimethod<2.0" "nbmake>=1.4.6" "numba>=0.57" \
"numpy>=2,<3" "openmatrix==0.3.5.0" \
"numpy>=2,<3" \
"pandera>=0.30" "pandas>=2,<3" "platformdirs>=3.2" \
"psutil>=5.9" "pyarrow>=11.0" "pydantic>=2.6,<3" "pypyr>=5.8" \
"tables>=3.9" "pytest>=7.2" "pytest-cov" "pytest-regressions" \
Expand Down
17 changes: 8 additions & 9 deletions docs/walkthrough/loading-skims.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"from pathlib import Path\n",
"from tempfile import TemporaryDirectory\n",
"\n",
"import h5py\n",
"import numpy as np\n",
"import openmatrix\n",
"import pandas as pd\n",
"import xarray as xr\n",
"\n",
Expand Down Expand Up @@ -132,7 +132,7 @@
"source": [
"## OMX: time period in matrix names\n",
"\n",
"The openmatrix (OMX) standard defines a data format that stores two-dimensional matrix data. To represent a third dimension, one approach is to store a matrix for each time period and include the time period after a double underscore in the matrix name, such as `autotime__AM`."
"The Open Matrix (OMX) standard defines an HDF5 layout that stores two-dimensional matrix data. To represent a third dimension, one approach is to store a matrix for each time period and include the time period after a double underscore in the matrix name, such as `autotime__AM`."
]
},
{
Expand All @@ -143,15 +143,14 @@
"outputs": [],
"source": [
"omx_path = data_directory / \"skims.omx\"\n",
"with openmatrix.open_file(omx_path, mode=\"w\") as omx_file:\n",
"with h5py.File(omx_path, mode=\"w\") as omx_file:\n",
" for timeperiod in timeperiods:\n",
" omx_file.create_carray(\n",
" \"/data\",\n",
" f\"autotime__{timeperiod}\",\n",
" obj=source_skims.autotime.sel(timeperiod=timeperiod).values,\n",
" omx_file.create_dataset(\n",
" f\"data/autotime__{timeperiod}\",\n",
" data=source_skims.autotime.sel(timeperiod=timeperiod).values,\n",
" )\n",
" omx_file.create_carray(\"/lookup\", \"taz\", obj=zones)\n",
" omx_file.root._v_attrs.SHAPE = np.array([len(zones), len(zones)])"
" omx_file.create_dataset(\"lookup/taz\", data=zones)\n",
" omx_file.attrs[\"SHAPE\"] = np.array([len(zones), len(zones)])"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion envs/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies:
- numba>=0.57
- numexpr
- numpy>=1.19,<2
- openmatrix
- pandas>=1.2
- pyarrow
- pytest
Expand Down
1 change: 0 additions & 1 deletion envs/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies:
- pytest-regressions
- pytest-xdist
- nbmake
- openmatrix
- h5py
- python-blosc2
- hdf5plugin
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ testpaths = [
dev = [
"ipykernel>=6.31.0",
"nbmake>=1.5.5",
"openmatrix>=0.3.5.0",
"pytest>=8.4.2",
"pytest-regressions>=2.8.3",
"scipy>=1.13.1",
Expand Down
Loading
Loading