pyrregular 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyrregular-0.2.0 → pyrregular-0.2.2}/.github/workflows/build.yml +10 -5
- {pyrregular-0.2.0 → pyrregular-0.2.2}/.github/workflows/python-publish.yml +11 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/.github/workflows/sphinx.yml +2 -3
- {pyrregular-0.2.0 → pyrregular-0.2.2}/PKG-INFO +2 -1
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/notebooks/dataset_conversion.ipynb +9 -9
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/notebooks/your_dataset.h5 +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyproject.toml +1 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/_version.py +3 -3
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/accessor.py +2 -2
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/conversion_utils.py +7 -1
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/io_utils.py +50 -3
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/ncde.py +1 -29
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/repository.py +5 -2
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/PKG-INFO +2 -1
- pyrregular-0.2.2/pyrregular.egg-info/scm_version.json +8 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/setup.cfg +1 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/test_dataset_loading.py +2 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/test_offline.py +52 -0
- pyrregular-0.2.0/pyrregular.egg-info/scm_version.json +0 -8
- {pyrregular-0.2.0 → pyrregular-0.2.2}/.gitignore +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/.gitmodules +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/.pre-commit-config.yaml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/README.md +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/images/logo_01.png +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/accuracy_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/accuracy_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/balanced_accuracy_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/balanced_accuracy_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/f1_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/f1_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/fit_time_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/fit_time_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/jaccard_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/jaccard_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/precision_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/precision_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/predict_time_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/predict_time_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/recall_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/recall_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/roc_auc_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/roc_auc_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/total_time_mean.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/assets/results/total_time_std.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/Makefile +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/api/index.rst +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/conf.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/index.rst +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/make.bat +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/notebooks/quick_start.ipynb +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/notebooks/your_original_dataset.csv +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/docs/requirements.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Abf.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Ais.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/AllGestureWiimoteX.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/AllGestureWiimoteY.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/AllGestureWiimoteZ.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Animals.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/AsphaltObstaclesCoordinates.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/AsphaltPavementTypeCoordinates.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/AsphaltRegularityCoordinates.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/CharacterTrajectories.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/CombinedTrajectories.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/DodgerLoopDay.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/DodgerLoopGame.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/DodgerLoopWeekend.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Garment.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Geolife.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/GeolifeSupervised.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/GestureMidAirD1.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/GestureMidAirD2.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/GestureMidAirD3.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/GesturePebbleZ1.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/GesturePebbleZ2.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/InsectWingbeat.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/JapaneseVowels.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Ldfpa.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/MelbournePedestrian.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Mimic3.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/PLAID.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Pamap2.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Physionet2012.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Physionet2019.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/PickupGestureWiimoteZ.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Seabirds.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/ShakeGestureWiimoteZ.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/SpokenArabicDigits.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/TDrive.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Taxi.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/metadata/Vehicles.yml +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/backend.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/data_utils.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/abf.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/ais.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/animals.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/combined_trajectories.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/garment.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/geolife.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/geolife_supervised.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/ldfpa.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/mimic3.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/pamap2.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/physionet2012.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/physionet2019.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/seabirds.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/t_drive.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/taxi.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/datasets/vehicles.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/describe.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/dev/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/dev/repository_dev.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/borf.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/brits.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/grud.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/knn.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/lgbm.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/nodes.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/raindrop.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/ridge_cv.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/rifc.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/rocket.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/saits.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/svm.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/timesnet.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/models/torch_dataloader.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/reader_interface.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/registry.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/uea_ucr_datasets.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/wrappers/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/wrappers/pypots_wrapper.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular/wrappers/tslearn_wrapper.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/SOURCES.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/dependency_links.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/entry_points.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/requires.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/scm_file_list.json +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/pyrregular.egg-info/top_level.txt +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/setup.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/_deprecated/__init__.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/_deprecated/test_dataset_conversion.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/_deprecated/test_dataset_sanity.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/_deprecated/utils.py +0 -0
- {pyrregular-0.2.0 → pyrregular-0.2.2}/tests/constants.py +0 -0
|
@@ -4,15 +4,15 @@ on:
|
|
|
4
4
|
pull_request:
|
|
5
5
|
branches: [ main ]
|
|
6
6
|
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
types: [ published ]
|
|
7
|
+
workflow_call:
|
|
9
8
|
|
|
10
9
|
jobs:
|
|
11
10
|
build:
|
|
12
11
|
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
13
|
matrix:
|
|
14
14
|
os: [ubuntu-latest]
|
|
15
|
-
python-version: ["3.11"]
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
16
16
|
runs-on: ${{ matrix.os }}
|
|
17
17
|
|
|
18
18
|
steps:
|
|
@@ -35,6 +35,11 @@ jobs:
|
|
|
35
35
|
run: |
|
|
36
36
|
pip install ".[test]"
|
|
37
37
|
|
|
38
|
-
- name: Test with pytest
|
|
38
|
+
- name: Test with pytest (offline)
|
|
39
39
|
run: |
|
|
40
|
-
pytest
|
|
40
|
+
pytest -m "not network"
|
|
41
|
+
|
|
42
|
+
- name: Test with pytest (dataset downloads)
|
|
43
|
+
if: matrix.python-version == '3.11'
|
|
44
|
+
run: |
|
|
45
|
+
pytest -m network
|
|
@@ -8,7 +8,11 @@ permissions:
|
|
|
8
8
|
contents: read
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
|
+
test:
|
|
12
|
+
uses: ./.github/workflows/build.yml
|
|
13
|
+
|
|
11
14
|
deploy:
|
|
15
|
+
needs: test
|
|
12
16
|
runs-on: ubuntu-latest
|
|
13
17
|
steps:
|
|
14
18
|
- uses: actions/checkout@v4
|
|
@@ -33,3 +37,10 @@ jobs:
|
|
|
33
37
|
with:
|
|
34
38
|
user: __token__
|
|
35
39
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
40
|
+
|
|
41
|
+
docs:
|
|
42
|
+
needs: test
|
|
43
|
+
uses: ./.github/workflows/sphinx.yml
|
|
44
|
+
permissions:
|
|
45
|
+
contents: write
|
|
46
|
+
pages: write
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
name: "docs"
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
4
|
workflow_dispatch:
|
|
5
|
+
workflow_call:
|
|
7
6
|
|
|
8
7
|
permissions:
|
|
9
8
|
contents: write
|
|
@@ -39,7 +38,7 @@ jobs:
|
|
|
39
38
|
make clean html SPHINXOPTS='-a'
|
|
40
39
|
|
|
41
40
|
- name: Deploy to GitHub Pages
|
|
42
|
-
if: github.ref == 'refs/heads/main'
|
|
41
|
+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
|
43
42
|
uses: peaceiris/actions-gh-pages@v3
|
|
44
43
|
with:
|
|
45
44
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyrregular
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Irregular time series made easy
|
|
5
5
|
Author: Francesco Spinnato, Cristiano Landi
|
|
6
6
|
Author-email: francesco.spinnato@unipi.it
|
|
@@ -8,6 +8,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.10
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
12
|
Requires-Python: >=3.10
|
|
12
13
|
Description-Content-Type: text/markdown
|
|
13
14
|
Requires-Dist: awkward
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
"name": "stderr",
|
|
243
243
|
"output_type": "stream",
|
|
244
244
|
"text": [
|
|
245
|
-
"Getting dataset metadata: 100it [00:00,
|
|
246
|
-
"Reading dataset: 100%|██████████| 100/100 [00:00<00:00,
|
|
245
|
+
"Getting dataset metadata: 100it [00:00, 25472.51it/s]\n",
|
|
246
|
+
"Reading dataset: 100%|██████████| 100/100 [00:00<00:00, 31818.42it/s]\n"
|
|
247
247
|
]
|
|
248
248
|
},
|
|
249
249
|
{
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
" * ts_id (ts_id) <U1 12B 'A' 'B' 'C'\n",
|
|
798
798
|
" labels (ts_id) int64 24B 0 1 1\n",
|
|
799
799
|
" * signal_id (signal_id) <U1 12B 'X' 'Y' 'Z'\n",
|
|
800
|
-
" * time_id (time_id) datetime64[us] 800B 2023-01-01 ... 2023-01-05T03:00:00</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-obj-name'></div><ul class='xr-dim-list'><li><span class='xr-has-index'>ts_id</span>: 3</li><li><span class='xr-has-index'>signal_id</span>: 3</li><li><span class='xr-has-index'>time_id</span>: 100</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-
|
|
800
|
+
" * time_id (time_id) datetime64[us] 800B 2023-01-01 ... 2023-01-05T03:00:00</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-obj-name'></div><ul class='xr-dim-list'><li><span class='xr-has-index'>ts_id</span>: 3</li><li><span class='xr-has-index'>signal_id</span>: 3</li><li><span class='xr-has-index'>time_id</span>: 100</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-80ed1c01-b22d-47c9-af4e-a75c9a022079' class='xr-array-in' type='checkbox' checked><label for='section-80ed1c01-b22d-47c9-af4e-a75c9a022079' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span><COO: nnz=100, fill_value=nan></span></div><div class='xr-array-data'><table><tbody><tr><th style=\"text-align: left\">Format</th><td style=\"text-align: left\">coo</td></tr><tr><th style=\"text-align: left\">Data Type</th><td style=\"text-align: left\">float64</td></tr><tr><th style=\"text-align: left\">Shape</th><td style=\"text-align: left\">(3, 3, 100)</td></tr><tr><th style=\"text-align: left\">nnz</th><td style=\"text-align: left\">100</td></tr><tr><th style=\"text-align: left\">Density</th><td style=\"text-align: left\">0.1111111111111111</td></tr><tr><th style=\"text-align: left\">Read-only</th><td style=\"text-align: left\">True</td></tr><tr><th style=\"text-align: left\">Size</th><td style=\"text-align: left\">3.1K</td></tr><tr><th style=\"text-align: left\">Storage ratio</th><td style=\"text-align: left\">0.44</td></tr></tbody></table></div></div></li><li class='xr-section-item'><input id='section-de45d65c-5d7e-4a81-8c91-ec68d1449b2f' class='xr-section-summary-in' type='checkbox' checked /><label for='section-de45d65c-5d7e-4a81-8c91-ec68d1449b2f' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>ts_id</span></div><div class='xr-var-dims'>(ts_id)</div><div class='xr-var-dtype'><U1</div><div class='xr-var-preview xr-preview'>'A' 'B' 'C'</div><input id='attrs-e559913e-d5b2-47ce-8eeb-3134c684a40d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e559913e-d5b2-47ce-8eeb-3134c684a40d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bc405cb1-0ec2-4733-8421-b9e2a28356fa' class='xr-var-data-in' type='checkbox'><label for='data-bc405cb1-0ec2-4733-8421-b9e2a28356fa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['A', 'B', 'C'], dtype='<U1')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(ts_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 1</div><input id='attrs-f416c0ed-07a4-4eca-8e1e-17c10a779380' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f416c0ed-07a4-4eca-8e1e-17c10a779380' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-99ff9606-9c79-4cdd-8d2c-b3b68944936e' class='xr-var-data-in' type='checkbox'><label for='data-99ff9606-9c79-4cdd-8d2c-b3b68944936e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 1])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>signal_id</span></div><div class='xr-var-dims'>(signal_id)</div><div class='xr-var-dtype'><U1</div><div class='xr-var-preview xr-preview'>'X' 'Y' 'Z'</div><input id='attrs-f279ed0e-01b0-46cf-8fe9-29836d4ef14f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f279ed0e-01b0-46cf-8fe9-29836d4ef14f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-32e31c09-ba4d-47ca-ba7d-51f20ed16e05' class='xr-var-data-in' type='checkbox'><label for='data-32e31c09-ba4d-47ca-ba7d-51f20ed16e05' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['X', 'Y', 'Z'], dtype='<U1')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time_id</span></div><div class='xr-var-dims'>(time_id)</div><div class='xr-var-dtype'>datetime64[us]</div><div class='xr-var-preview xr-preview'>2023-01-01 ... 2023-01-05T03:00:00</div><input id='attrs-347111b2-549a-4bdc-bb88-eb752cb6d907' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-347111b2-549a-4bdc-bb88-eb752cb6d907' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9fedf652-6cde-47ed-b4fe-f6b6b06ed435' class='xr-var-data-in' type='checkbox'><label for='data-9fedf652-6cde-47ed-b4fe-f6b6b06ed435' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['2023-01-01T00:00:00.000000', '2023-01-01T01:00:00.000000',\n",
|
|
801
801
|
" '2023-01-01T02:00:00.000000', '2023-01-01T03:00:00.000000',\n",
|
|
802
802
|
" '2023-01-01T04:00:00.000000', '2023-01-01T05:00:00.000000',\n",
|
|
803
803
|
" '2023-01-01T06:00:00.000000', '2023-01-01T07:00:00.000000',\n",
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
" * signal_id (signal_id) <U1 12B 'X' 'Y' 'Z'\n",
|
|
1516
1516
|
" * time_id (time_id) datetime64[ns] 800B 2023-01-01 ... 2023-01-05T03:00:00\n",
|
|
1517
1517
|
"Data variables:\n",
|
|
1518
|
-
" data (ts_id, signal_id, time_id) float64 3kB <COO: nnz=100, fill_value=nan></pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-
|
|
1518
|
+
" data (ts_id, signal_id, time_id) float64 3kB <COO: nnz=100, fill_value=nan></pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-59d96130-93c5-4933-b532-4dbb28dd5998' class='xr-section-summary-in' type='checkbox' disabled /><label for='section-59d96130-93c5-4933-b532-4dbb28dd5998' class='xr-section-summary'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>ts_id</span>: 3</li><li><span class='xr-has-index'>signal_id</span>: 3</li><li><span class='xr-has-index'>time_id</span>: 100</li></ul></div></li><li class='xr-section-item'><input id='section-cbd4d746-929d-4347-aaac-55488de84461' class='xr-section-summary-in' type='checkbox' checked /><label for='section-cbd4d746-929d-4347-aaac-55488de84461' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>ts_id</span></div><div class='xr-var-dims'>(ts_id)</div><div class='xr-var-dtype'><U1</div><div class='xr-var-preview xr-preview'>'A' 'B' 'C'</div><input id='attrs-d1659b37-2b09-444f-84f3-f343ee61f60b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d1659b37-2b09-444f-84f3-f343ee61f60b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a8c18b86-82e9-456f-b8aa-368942237936' class='xr-var-data-in' type='checkbox'><label for='data-a8c18b86-82e9-456f-b8aa-368942237936' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['A', 'B', 'C'], dtype='<U1')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(ts_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 1</div><input id='attrs-77a7d7a4-6ae9-4355-b6d7-ecb6e0700e99' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-77a7d7a4-6ae9-4355-b6d7-ecb6e0700e99' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-10b050f7-7558-428b-be2a-3fce65f7c806' class='xr-var-data-in' type='checkbox'><label for='data-10b050f7-7558-428b-be2a-3fce65f7c806' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 1])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>signal_id</span></div><div class='xr-var-dims'>(signal_id)</div><div class='xr-var-dtype'><U1</div><div class='xr-var-preview xr-preview'>'X' 'Y' 'Z'</div><input id='attrs-2ac2bc73-02a3-4b7e-8ff7-2fe67efd36b5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2ac2bc73-02a3-4b7e-8ff7-2fe67efd36b5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b4fe6441-0089-4378-aa78-74cd1b8e236b' class='xr-var-data-in' type='checkbox'><label for='data-b4fe6441-0089-4378-aa78-74cd1b8e236b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['X', 'Y', 'Z'], dtype='<U1')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time_id</span></div><div class='xr-var-dims'>(time_id)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2023-01-01 ... 2023-01-05T03:00:00</div><input id='attrs-20b50e5f-db50-4427-a77d-a68e695133ca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-20b50e5f-db50-4427-a77d-a68e695133ca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-932e0893-b37c-48ce-a41c-edb9bd56148c' class='xr-var-data-in' type='checkbox'><label for='data-932e0893-b37c-48ce-a41c-edb9bd56148c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['2023-01-01T00:00:00.000000000', '2023-01-01T01:00:00.000000000',\n",
|
|
1519
1519
|
" '2023-01-01T02:00:00.000000000', '2023-01-01T03:00:00.000000000',\n",
|
|
1520
1520
|
" '2023-01-01T04:00:00.000000000', '2023-01-01T05:00:00.000000000',\n",
|
|
1521
1521
|
" '2023-01-01T06:00:00.000000000', '2023-01-01T07:00:00.000000000',\n",
|
|
@@ -1565,7 +1565,7 @@
|
|
|
1565
1565
|
" '2023-01-04T22:00:00.000000000', '2023-01-04T23:00:00.000000000',\n",
|
|
1566
1566
|
" '2023-01-05T00:00:00.000000000', '2023-01-05T01:00:00.000000000',\n",
|
|
1567
1567
|
" '2023-01-05T02:00:00.000000000', '2023-01-05T03:00:00.000000000'],\n",
|
|
1568
|
-
" dtype='datetime64[ns]')</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-
|
|
1568
|
+
" dtype='datetime64[ns]')</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-124c2966-ad24-4f21-bc41-ee63c08e54ce' class='xr-section-summary-in' type='checkbox' checked /><label for='section-124c2966-ad24-4f21-bc41-ee63c08e54ce' class='xr-section-summary' title='Expand/collapse section'>Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(ts_id, signal_id, time_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'><COO: nnz=100, fill_value=nan></div><input id='attrs-2c6e6bb5-9ef8-44cc-b8e8-1956fd37edd2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2c6e6bb5-9ef8-44cc-b8e8-1956fd37edd2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b291b62a-e414-4f12-ac8e-44fd2cb4c998' class='xr-var-data-in' type='checkbox'><label for='data-b291b62a-e414-4f12-ac8e-44fd2cb4c998' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><table><tbody><tr><th style=\"text-align: left\">Format</th><td style=\"text-align: left\">coo</td></tr><tr><th style=\"text-align: left\">Data Type</th><td style=\"text-align: left\">float64</td></tr><tr><th style=\"text-align: left\">Shape</th><td style=\"text-align: left\">(3, 3, 100)</td></tr><tr><th style=\"text-align: left\">nnz</th><td style=\"text-align: left\">100</td></tr><tr><th style=\"text-align: left\">Density</th><td style=\"text-align: left\">0.1111111111111111</td></tr><tr><th style=\"text-align: left\">Read-only</th><td style=\"text-align: left\">True</td></tr><tr><th style=\"text-align: left\">Size</th><td style=\"text-align: left\">3.1K</td></tr><tr><th style=\"text-align: left\">Storage ratio</th><td style=\"text-align: left\">0.44</td></tr></tbody></table></div></li></ul></div></li></ul></div></div>"
|
|
1569
1569
|
],
|
|
1570
1570
|
"text/plain": [
|
|
1571
1571
|
"<xarray.Dataset> Size: 4kB\n",
|
|
@@ -1735,8 +1735,8 @@
|
|
|
1735
1735
|
"name": "stderr",
|
|
1736
1736
|
"output_type": "stream",
|
|
1737
1737
|
"text": [
|
|
1738
|
-
"Getting dataset metadata: 711it [00:00,
|
|
1739
|
-
"Reading dataset: 100%|██████████| 711/711 [00:00<00:00,
|
|
1738
|
+
"Getting dataset metadata: 711it [00:00, 298872.53it/s]\n",
|
|
1739
|
+
"Reading dataset: 100%|██████████| 711/711 [00:00<00:00, 66981.50it/s]\n"
|
|
1740
1740
|
]
|
|
1741
1741
|
},
|
|
1742
1742
|
{
|
|
@@ -2292,12 +2292,12 @@
|
|
|
2292
2292
|
" * signal_id (signal_id) <U21 168B '0' '1'\n",
|
|
2293
2293
|
" * time_id (time_id) int64 800B 0 1 2 3 4 5 6 7 ... 92 93 94 95 96 97 98 99\n",
|
|
2294
2294
|
"Attributes:\n",
|
|
2295
|
-
" authors: Bond, James Bond</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-obj-name'></div><ul class='xr-dim-list'><li><span class='xr-has-index'>ts_id</span>: 10</li><li><span class='xr-has-index'>signal_id</span>: 2</li><li><span class='xr-has-index'>time_id</span>: 100</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-
|
|
2295
|
+
" authors: Bond, James Bond</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-obj-name'></div><ul class='xr-dim-list'><li><span class='xr-has-index'>ts_id</span>: 10</li><li><span class='xr-has-index'>signal_id</span>: 2</li><li><span class='xr-has-index'>time_id</span>: 100</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-ff97e63c-b8c6-492b-8b97-68a6c8b7479c' class='xr-array-in' type='checkbox' checked><label for='section-ff97e63c-b8c6-492b-8b97-68a6c8b7479c' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span><COO: nnz=711, fill_value=nan></span></div><div class='xr-array-data'><table><tbody><tr><th style=\"text-align: left\">Format</th><td style=\"text-align: left\">coo</td></tr><tr><th style=\"text-align: left\">Data Type</th><td style=\"text-align: left\">float64</td></tr><tr><th style=\"text-align: left\">Shape</th><td style=\"text-align: left\">(10, 2, 100)</td></tr><tr><th style=\"text-align: left\">nnz</th><td style=\"text-align: left\">711</td></tr><tr><th style=\"text-align: left\">Density</th><td style=\"text-align: left\">0.3555</td></tr><tr><th style=\"text-align: left\">Read-only</th><td style=\"text-align: left\">True</td></tr><tr><th style=\"text-align: left\">Size</th><td style=\"text-align: left\">22.2K</td></tr><tr><th style=\"text-align: left\">Storage ratio</th><td style=\"text-align: left\">1.42</td></tr></tbody></table></div></div></li><li class='xr-section-item'><input id='section-b50862aa-95e1-42cf-ab1f-3040e2571596' class='xr-section-summary-in' type='checkbox' checked /><label for='section-b50862aa-95e1-42cf-ab1f-3040e2571596' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>ts_id</span></div><div class='xr-var-dims'>(ts_id)</div><div class='xr-var-dtype'><U21</div><div class='xr-var-preview xr-preview'>'0' '1' '2' '3' ... '6' '7' '8' '9'</div><input id='attrs-70f9a71e-85a0-4eca-9476-ff1619be7512' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-70f9a71e-85a0-4eca-9476-ff1619be7512' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-52de25cf-65db-4cb1-bd33-9312decd8cf9' class='xr-var-data-in' type='checkbox'><label for='data-52de25cf-65db-4cb1-bd33-9312decd8cf9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], dtype='<U21')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(ts_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 1 0 0 0 1 1 1 0</div><input id='attrs-52ebbb1c-883f-4d14-9cd3-0b165f2af3ce' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-52ebbb1c-883f-4d14-9cd3-0b165f2af3ce' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-16365a0c-f62c-428e-86a7-02d8bfe98f95' class='xr-var-data-in' type='checkbox'><label for='data-16365a0c-f62c-428e-86a7-02d8bfe98f95' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 1, 0, 0, 0, 1, 1, 1, 0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>signal_id</span></div><div class='xr-var-dims'>(signal_id)</div><div class='xr-var-dtype'><U21</div><div class='xr-var-preview xr-preview'>'0' '1'</div><input id='attrs-450d0260-e6e9-420e-8fd4-bd674dd524e8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-450d0260-e6e9-420e-8fd4-bd674dd524e8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fa23dd6f-0e72-4265-b5ed-893915def147' class='xr-var-data-in' type='checkbox'><label for='data-fa23dd6f-0e72-4265-b5ed-893915def147' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(['0', '1'], dtype='<U21')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time_id</span></div><div class='xr-var-dims'>(time_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 94 95 96 97 98 99</div><input id='attrs-834a3d94-0a9d-43b7-9bb5-a0a725193a59' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-834a3d94-0a9d-43b7-9bb5-a0a725193a59' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-692ad537-d9d0-41be-b5e1-512aadffe2db' class='xr-var-data-in' type='checkbox'><label for='data-692ad537-d9d0-41be-b5e1-512aadffe2db' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
|
|
2296
2296
|
" 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
|
|
2297
2297
|
" 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,\n",
|
|
2298
2298
|
" 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,\n",
|
|
2299
2299
|
" 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,\n",
|
|
2300
|
-
" 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-
|
|
2300
|
+
" 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-836f2e2d-2062-4f47-bde0-7c76ac490ff9' class='xr-section-summary-in' type='checkbox' checked /><label for='section-836f2e2d-2062-4f47-bde0-7c76ac490ff9' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>authors :</span></dt><dd>Bond, James Bond</dd></dl></div></li></ul></div></div>"
|
|
2301
2301
|
],
|
|
2302
2302
|
"text/plain": [
|
|
2303
2303
|
"<xarray.DataArray (ts_id: 10, signal_id: 2, time_id: 100)> Size: 23kB\n",
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
21
|
+
__version__ = version = '0.2.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 2)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ga0f3c03bc'
|
|
@@ -2,7 +2,7 @@ import numpy as np
|
|
|
2
2
|
import pandas as pd
|
|
3
3
|
import xarray as xr
|
|
4
4
|
|
|
5
|
-
from pyrregular.conversion_utils import _ak_dropnan,
|
|
5
|
+
from pyrregular.conversion_utils import _ak_dropnan, _reset_time_index
|
|
6
6
|
from pyrregular.io_utils import save_to_file
|
|
7
7
|
|
|
8
8
|
|
|
@@ -212,7 +212,7 @@ class IrregularAccessor:
|
|
|
212
212
|
columns[name] = _repeat(coord.values, idx[coord.dims[0]])
|
|
213
213
|
return pd.DataFrame(columns)
|
|
214
214
|
|
|
215
|
-
def to_hdf5(self, filename, compression="gzip", compression_opts=
|
|
215
|
+
def to_hdf5(self, filename, compression="gzip", compression_opts=1):
|
|
216
216
|
save_to_file(
|
|
217
217
|
data_array=self._da,
|
|
218
218
|
filename=filename,
|
|
@@ -134,7 +134,7 @@ def _to_tslearn(X):
|
|
|
134
134
|
return X.swapaxes(1, 2)
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
def _fill_time_index(arr):
|
|
137
|
+
def _fill_time_index(arr, nan_delta=1):
|
|
138
138
|
T = deepcopy(arr)
|
|
139
139
|
|
|
140
140
|
# time delta
|
|
@@ -143,6 +143,12 @@ def _fill_time_index(arr):
|
|
|
143
143
|
# mean time delta
|
|
144
144
|
delta_mean = np.nanmean(a_diff, axis=2, keepdims=True)
|
|
145
145
|
|
|
146
|
+
nans = np.isnan(delta_mean)
|
|
147
|
+
if np.any(
|
|
148
|
+
nans
|
|
149
|
+
): # this can happen if there is only 1 valid value in the time series
|
|
150
|
+
delta_mean[nans] = nan_delta
|
|
151
|
+
|
|
146
152
|
# last timestep
|
|
147
153
|
last_valid_t = np.nanmax(T, axis=2, keepdims=True)
|
|
148
154
|
|
|
@@ -111,7 +111,10 @@ def load_yaml(filename: str):
|
|
|
111
111
|
|
|
112
112
|
def _read_csvs(filenames: list, chunksize=1000, reader_fun=None, **kwargs):
|
|
113
113
|
for filename in filenames:
|
|
114
|
-
|
|
114
|
+
# round_trip: correctly rounded floats, identical on every platform
|
|
115
|
+
for df in pd.read_csv(
|
|
116
|
+
filename, chunksize=chunksize, float_precision="round_trip"
|
|
117
|
+
):
|
|
115
118
|
if reader_fun is None:
|
|
116
119
|
for row in df.to_dict(orient="records"):
|
|
117
120
|
yield row
|
|
@@ -156,6 +159,30 @@ def _get_metadata(
|
|
|
156
159
|
return dates, ids, signals, n_records
|
|
157
160
|
|
|
158
161
|
|
|
162
|
+
def _check_static(keys, id_name, static_names, hint):
|
|
163
|
+
"""Raise if an id has more than one value for a static column.
|
|
164
|
+
|
|
165
|
+
read_csv identifies an id by the tuple (id, *static values), so a column that
|
|
166
|
+
is not really static would silently split the id into several ones.
|
|
167
|
+
"""
|
|
168
|
+
first = {}
|
|
169
|
+
for key in keys:
|
|
170
|
+
other = first.setdefault(key[0], key)
|
|
171
|
+
if other != key:
|
|
172
|
+
columns = [
|
|
173
|
+
n
|
|
174
|
+
for n, a, b in zip(static_names, other[1:], key[1:])
|
|
175
|
+
if a is not b and a != b
|
|
176
|
+
]
|
|
177
|
+
names = ", ".join(repr(c) for c in columns)
|
|
178
|
+
verb = "is" if len(columns) == 1 else "are"
|
|
179
|
+
raise ValueError(
|
|
180
|
+
f"{names} {verb} not static for {id_name} {key[0]!r} (values "
|
|
181
|
+
f"{other[1:]} and {key[1:]}). A static column must have one value "
|
|
182
|
+
f"per id. {hint}"
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
159
186
|
def read_csv(
|
|
160
187
|
filenames: str | list | dict,
|
|
161
188
|
ts_id: str = "ts_id",
|
|
@@ -190,6 +217,27 @@ def read_csv(
|
|
|
190
217
|
**kwargs,
|
|
191
218
|
)
|
|
192
219
|
|
|
220
|
+
# a static column must have one value per id, otherwise the id would be split
|
|
221
|
+
_check_static(
|
|
222
|
+
ids,
|
|
223
|
+
ts_id,
|
|
224
|
+
dims["ts_id"],
|
|
225
|
+
hint='If it changes over time, move it to dims["time_id"] or use it as a '
|
|
226
|
+
"signal; if each value should be its own series, include it in the series id.",
|
|
227
|
+
)
|
|
228
|
+
_check_static(
|
|
229
|
+
signals,
|
|
230
|
+
signal_id,
|
|
231
|
+
dims["signal_id"],
|
|
232
|
+
hint="If it differs between series, move it to dims['ts_id'].",
|
|
233
|
+
)
|
|
234
|
+
_check_static(
|
|
235
|
+
dates,
|
|
236
|
+
time_id,
|
|
237
|
+
dims["time_id"],
|
|
238
|
+
hint="If it differs between series, move it to dims['ts_id'] or use it as a signal.",
|
|
239
|
+
)
|
|
240
|
+
|
|
193
241
|
# date strings are parsed before sorting, so the time axis follows real time
|
|
194
242
|
parsed_dates = None
|
|
195
243
|
if time_index_as_datetime and all(isinstance(d[0], str) for d in dates):
|
|
@@ -286,6 +334,5 @@ def read_csv(
|
|
|
286
334
|
|
|
287
335
|
def get_current_aoe_time():
|
|
288
336
|
aoe_tz = timezone(timedelta(hours=-12))
|
|
289
|
-
|
|
290
|
-
current_time_aoe = current_time_utc.replace(tzinfo=timezone.utc).astimezone(aoe_tz)
|
|
337
|
+
current_time_aoe = datetime.now(timezone.utc).astimezone(aoe_tz)
|
|
291
338
|
return current_time_aoe.isoformat()
|
|
@@ -15,38 +15,10 @@ import optax
|
|
|
15
15
|
from sklearn.base import BaseEstimator, ClassifierMixin
|
|
16
16
|
from sklearn.model_selection import train_test_split
|
|
17
17
|
|
|
18
|
+
from pyrregular.conversion_utils import _fill_time_index
|
|
18
19
|
from pyrregular.models.nodes import _standardize
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
def _fill_time_index(arr, nan_delta=1):
|
|
22
|
-
T = deepcopy(arr)
|
|
23
|
-
|
|
24
|
-
# time delta
|
|
25
|
-
a_diff = T[:, :, 1:] - T[:, :, :-1]
|
|
26
|
-
|
|
27
|
-
# mean time delta
|
|
28
|
-
delta_mean = np.nanmean(a_diff, axis=2, keepdims=True)
|
|
29
|
-
|
|
30
|
-
nans = np.isnan(delta_mean)
|
|
31
|
-
if np.any(
|
|
32
|
-
nans
|
|
33
|
-
): # this can happen if there is only 1 valid value in the time series
|
|
34
|
-
delta_mean[nans] = nan_delta
|
|
35
|
-
|
|
36
|
-
# last timestep
|
|
37
|
-
last_valid_t = np.nanmax(T, axis=2, keepdims=True)
|
|
38
|
-
|
|
39
|
-
# find where the nans are
|
|
40
|
-
nan_mask = np.isnan(T)
|
|
41
|
-
|
|
42
|
-
# where nans are there is an increasing value from 1 to the last nan
|
|
43
|
-
nan_indices = np.cumsum(nan_mask, axis=2)
|
|
44
|
-
|
|
45
|
-
replacement = (last_valid_t + delta_mean * nan_indices)[nan_mask]
|
|
46
|
-
T[nan_mask] = replacement
|
|
47
|
-
return T
|
|
48
|
-
|
|
49
|
-
|
|
50
22
|
def _fill_all_nans_signals(X):
|
|
51
23
|
X_ = deepcopy(X)
|
|
52
24
|
mask = np.sum(np.isnan(X_), axis=2) >= X_.shape[2] - 2
|
|
@@ -25,7 +25,8 @@ def download_dataset_from_huggingface(
|
|
|
25
25
|
if api_token is None:
|
|
26
26
|
raise ValueError("You need to provide an API token to download the dataset")
|
|
27
27
|
downloader = pooch.HTTPDownloader(
|
|
28
|
-
|
|
28
|
+
progressbar=progressbar,
|
|
29
|
+
headers={"Authorization": f"Bearer {api_token}"},
|
|
29
30
|
)
|
|
30
31
|
else:
|
|
31
32
|
downloader = pooch.HTTPDownloader(progressbar=progressbar)
|
|
@@ -35,7 +36,9 @@ def download_dataset_from_huggingface(
|
|
|
35
36
|
def load_dataset_from_file(name, api_token=None):
|
|
36
37
|
if ".h5" not in name:
|
|
37
38
|
name += ".h5"
|
|
38
|
-
file = download_dataset_from_huggingface(
|
|
39
|
+
file = download_dataset_from_huggingface(
|
|
40
|
+
name, use_api_token=api_token is not None, api_token=api_token
|
|
41
|
+
)
|
|
39
42
|
return file
|
|
40
43
|
|
|
41
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyrregular
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Irregular time series made easy
|
|
5
5
|
Author: Francesco Spinnato, Cristiano Landi
|
|
6
6
|
Author-email: francesco.spinnato@unipi.it
|
|
@@ -8,6 +8,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.10
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
12
|
Requires-Python: >=3.10
|
|
12
13
|
Description-Content-Type: text/markdown
|
|
13
14
|
Requires-Dist: awkward
|
|
@@ -355,3 +355,55 @@ def test_version():
|
|
|
355
355
|
import pyrregular
|
|
356
356
|
|
|
357
357
|
assert isinstance(pyrregular.__version__, str) and pyrregular.__version__
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
def test_read_csv_rejects_non_static_columns(tmp_path):
|
|
361
|
+
# label changes inside series a: it is not static, so read_csv must not split a
|
|
362
|
+
rows = [
|
|
363
|
+
("a", "s", 1, 1.0, "x"),
|
|
364
|
+
("a", "s", 2, 2.0, "x"),
|
|
365
|
+
("a", "s", 3, 3.0, "y"),
|
|
366
|
+
("b", "s", 1, 5.0, "z"),
|
|
367
|
+
]
|
|
368
|
+
path = tmp_path / "static.csv"
|
|
369
|
+
pd.DataFrame(
|
|
370
|
+
rows, columns=["ts_id", "signal_id", "time_id", "value_id", "label"]
|
|
371
|
+
).to_csv(path, index=False)
|
|
372
|
+
with pytest.raises(ValueError, match="'label' is not static for ts_id 'a'"):
|
|
373
|
+
read_csv(
|
|
374
|
+
path,
|
|
375
|
+
dims={"ts_id": ["label"], "signal_id": [], "time_id": []},
|
|
376
|
+
time_index_as_datetime=False,
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
def test_api_token_is_sent(monkeypatch):
|
|
381
|
+
# capture the downloader instead of downloading
|
|
382
|
+
from pyrregular import repository
|
|
383
|
+
|
|
384
|
+
seen = {}
|
|
385
|
+
|
|
386
|
+
def fake_fetch(name, downloader):
|
|
387
|
+
seen["name"], seen["downloader"] = name, downloader
|
|
388
|
+
return "fake/path.h5"
|
|
389
|
+
|
|
390
|
+
monkeypatch.delenv("HF_TOKEN", raising=False)
|
|
391
|
+
monkeypatch.setattr(repository.REPOSITORY, "fetch", fake_fetch)
|
|
392
|
+
assert (
|
|
393
|
+
repository.load_dataset_from_file("Garment", api_token="hf_x") == "fake/path.h5"
|
|
394
|
+
)
|
|
395
|
+
assert seen["name"] == "Garment.h5"
|
|
396
|
+
assert seen["downloader"].kwargs["headers"] == {"Authorization": "Bearer hf_x"}
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
def test_fill_time_index():
|
|
400
|
+
from pyrregular.conversion_utils import _fill_time_index
|
|
401
|
+
|
|
402
|
+
T = np.array(
|
|
403
|
+
[
|
|
404
|
+
[[0.0, 1.0, 3.0, nan, nan]], # mean step 1.5
|
|
405
|
+
[[5.0, nan, nan, nan, nan]], # one timestamp: no step, use nan_delta
|
|
406
|
+
]
|
|
407
|
+
)
|
|
408
|
+
assert_equal_nan(_fill_time_index(T)[:, 0, :], [[0, 1, 3, 4.5, 6], [5, 6, 7, 8, 9]])
|
|
409
|
+
assert_equal_nan(_fill_time_index(T, nan_delta=2)[1, 0], [5, 7, 9, 11, 13])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|