interpn 0.6.4__tar.gz → 0.7.0__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.
Files changed (88) hide show
  1. {interpn-0.6.4 → interpn-0.7.0}/.github/workflows/test-python.yml +17 -14
  2. {interpn-0.6.4 → interpn-0.7.0}/CHANGELOG.md +33 -0
  3. {interpn-0.6.4 → interpn-0.7.0}/Cargo.lock +22 -11
  4. {interpn-0.6.4 → interpn-0.7.0}/Cargo.toml +2 -2
  5. {interpn-0.6.4 → interpn-0.7.0}/PKG-INFO +10 -23
  6. {interpn-0.6.4 → interpn-0.7.0}/README.md +4 -3
  7. {interpn-0.6.4 → interpn-0.7.0}/docs/1d_quality_of_fit_Rectilinear.svg +147 -147
  8. {interpn-0.6.4 → interpn-0.7.0}/docs/1d_quality_of_fit_Regular.svg +144 -144
  9. {interpn-0.6.4 → interpn-0.7.0}/docs/2d_quality_of_fit_Rectilinear.svg +247 -247
  10. {interpn-0.6.4 → interpn-0.7.0}/docs/2d_quality_of_fit_Regular.svg +244 -244
  11. {interpn-0.6.4 → interpn-0.7.0}/docs/nearest_quality_of_fit.svg +2842 -2842
  12. {interpn-0.6.4 → interpn-0.7.0}/docs/perf.md +1 -1
  13. interpn-0.7.0/docs/requirements.txt +1 -0
  14. {interpn-0.6.4 → interpn-0.7.0}/examples/nearest_comparison.py +1 -1
  15. {interpn-0.6.4 → interpn-0.7.0}/pyproject.toml +16 -6
  16. {interpn-0.6.4 → interpn-0.7.0}/scripts/distr_pgo_install.sh +2 -2
  17. {interpn-0.6.4 → interpn-0.7.0}/scripts/distr_pgo_profile.sh +1 -1
  18. {interpn-0.6.4 → interpn-0.7.0}/scripts/native_pgo_install.sh +1 -1
  19. {interpn-0.6.4 → interpn-0.7.0}/scripts/pgo-profiles/pgo.profdata +0 -0
  20. interpn-0.7.0/src/interpn/__init__.py +199 -0
  21. interpn-0.7.0/src/interpn/raw.pyi +147 -0
  22. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/serialization.py +2 -2
  23. interpn-0.7.0/test/test_interpn.py +58 -0
  24. {interpn-0.6.4 → interpn-0.7.0}/test/test_multicubic_rectilinear.py +10 -0
  25. {interpn-0.6.4 → interpn-0.7.0}/test/test_multicubic_regular.py +11 -0
  26. {interpn-0.6.4 → interpn-0.7.0}/test/test_multilinear_rectilinear.py +11 -0
  27. {interpn-0.6.4 → interpn-0.7.0}/test/test_multilinear_regular.py +12 -0
  28. {interpn-0.6.4 → interpn-0.7.0}/test/test_nearest_rectilinear.py +9 -1
  29. {interpn-0.6.4 → interpn-0.7.0}/test/test_nearest_regular.py +10 -1
  30. {interpn-0.6.4 → interpn-0.7.0}/uv.lock +59 -536
  31. interpn-0.6.4/docs/requirements.txt +0 -1
  32. interpn-0.6.4/src/interpn/__init__.py +0 -29
  33. {interpn-0.6.4 → interpn-0.7.0}/.cargo/config.toml +0 -0
  34. {interpn-0.6.4 → interpn-0.7.0}/.github/workflows/release-python.yml +0 -0
  35. {interpn-0.6.4 → interpn-0.7.0}/.github/workflows/release-rust.yml +0 -0
  36. {interpn-0.6.4 → interpn-0.7.0}/.github/workflows/test-rust.yml +0 -0
  37. {interpn-0.6.4 → interpn-0.7.0}/.gitignore +0 -0
  38. {interpn-0.6.4 → interpn-0.7.0}/.readthedocs.yml +0 -0
  39. {interpn-0.6.4 → interpn-0.7.0}/LICENSE-APACHE +0 -0
  40. {interpn-0.6.4 → interpn-0.7.0}/LICENSE-MIT +0 -0
  41. {interpn-0.6.4 → interpn-0.7.0}/benches/bench.rs +0 -0
  42. {interpn-0.6.4 → interpn-0.7.0}/benches/bench_cpu.py +0 -0
  43. {interpn-0.6.4 → interpn-0.7.0}/benches/bench_mem.py +0 -0
  44. {interpn-0.6.4 → interpn-0.7.0}/docs/3d_throughput_vs_nobs.svg +0 -0
  45. {interpn-0.6.4 → interpn-0.7.0}/docs/3d_throughput_vs_nobs_prealloc.svg +0 -0
  46. {interpn-0.6.4 → interpn-0.7.0}/docs/4d_throughput_vs_nobs.svg +0 -0
  47. {interpn-0.6.4 → interpn-0.7.0}/docs/4d_throughput_vs_nobs_prealloc.svg +0 -0
  48. {interpn-0.6.4 → interpn-0.7.0}/docs/API_Docs.md +0 -0
  49. {interpn-0.6.4 → interpn-0.7.0}/docs/index.md +0 -0
  50. {interpn-0.6.4 → interpn-0.7.0}/docs/ram_vs_dims.svg +0 -0
  51. {interpn-0.6.4 → interpn-0.7.0}/docs/throughput_vs_dims_1000_obs.svg +0 -0
  52. {interpn-0.6.4 → interpn-0.7.0}/docs/throughput_vs_dims_1_obs.svg +0 -0
  53. {interpn-0.6.4 → interpn-0.7.0}/examples/cubic_comparison.py +0 -0
  54. {interpn-0.6.4 → interpn-0.7.0}/mkdocs.yml +0 -0
  55. {interpn-0.6.4 → interpn-0.7.0}/scripts/distr_pgo.sh +0 -0
  56. {interpn-0.6.4 → interpn-0.7.0}/scripts/native_pgo.sh +0 -0
  57. {interpn-0.6.4 → interpn-0.7.0}/scripts/native_pgo_profile.sh +0 -0
  58. {interpn-0.6.4 → interpn-0.7.0}/scripts/profile_workload.py +0 -0
  59. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/multicubic_rectilinear.py +0 -0
  60. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/multicubic_regular.py +0 -0
  61. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/multilinear_rectilinear.py +0 -0
  62. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/multilinear_regular.py +0 -0
  63. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/nearest_rectilinear.py +0 -0
  64. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/nearest_regular.py +0 -0
  65. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/py.typed +0 -0
  66. {interpn-0.6.4 → interpn-0.7.0}/src/interpn/raw.py +0 -0
  67. {interpn-0.6.4 → interpn-0.7.0}/src/lib.rs +0 -0
  68. {interpn-0.6.4 → interpn-0.7.0}/src/multicubic/mod.rs +0 -0
  69. {interpn-0.6.4 → interpn-0.7.0}/src/multicubic/rectilinear.rs +0 -0
  70. {interpn-0.6.4 → interpn-0.7.0}/src/multicubic/rectilinear_recursive.rs +0 -0
  71. {interpn-0.6.4 → interpn-0.7.0}/src/multicubic/regular.rs +0 -0
  72. {interpn-0.6.4 → interpn-0.7.0}/src/multicubic/regular_recursive.rs +0 -0
  73. {interpn-0.6.4 → interpn-0.7.0}/src/multilinear/mod.rs +0 -0
  74. {interpn-0.6.4 → interpn-0.7.0}/src/multilinear/rectilinear.rs +0 -0
  75. {interpn-0.6.4 → interpn-0.7.0}/src/multilinear/rectilinear_recursive.rs +0 -0
  76. {interpn-0.6.4 → interpn-0.7.0}/src/multilinear/regular.rs +0 -0
  77. {interpn-0.6.4 → interpn-0.7.0}/src/multilinear/regular_recursive.rs +0 -0
  78. {interpn-0.6.4 → interpn-0.7.0}/src/nearest/mod.rs +0 -0
  79. {interpn-0.6.4 → interpn-0.7.0}/src/nearest/rectilinear.rs +0 -0
  80. {interpn-0.6.4 → interpn-0.7.0}/src/nearest/regular.rs +0 -0
  81. {interpn-0.6.4 → interpn-0.7.0}/src/one_dim/hold.rs +0 -0
  82. {interpn-0.6.4 → interpn-0.7.0}/src/one_dim/linear.rs +0 -0
  83. {interpn-0.6.4 → interpn-0.7.0}/src/one_dim/mod.rs +0 -0
  84. {interpn-0.6.4 → interpn-0.7.0}/src/python.rs +0 -0
  85. {interpn-0.6.4 → interpn-0.7.0}/src/testing.rs +0 -0
  86. {interpn-0.6.4 → interpn-0.7.0}/src/utils.rs +0 -0
  87. {interpn-0.6.4 → interpn-0.7.0}/test/test_docs.py +0 -0
  88. {interpn-0.6.4 → interpn-0.7.0}/test/test_examples.py +0 -0
@@ -12,33 +12,38 @@ jobs:
12
12
  matrix:
13
13
  target: [x86_64]
14
14
  python-version:
15
- - "3.9"
16
15
  - "3.10"
17
16
  - "3.11"
18
17
  - "3.12"
19
18
  - "3.13"
20
19
  - "3.14"
20
+ sync-args: [--locked]
21
+
22
+ include:
23
+ - target: x86_64
24
+ python-version: "3.10.0"
25
+ sync-args: --resolution=lowest-direct
26
+
21
27
  steps:
22
28
  - uses: actions/checkout@v3
23
29
  - name: Install uv
24
- uses: astral-sh/setup-uv@v5
30
+ uses: astral-sh/setup-uv@v7
25
31
  with:
26
32
  python-version: ${{ matrix.python-version }}
27
33
 
28
34
  - name: Install
29
- run: |
30
- uv venv
31
- uv pip install -e .[test,bench]
35
+ run: uv sync --extra pydantic --group test --group bench ${{ matrix.sync-args }}
32
36
 
33
37
  - name: Format
34
- run: uv run ruff check; uv run ruff format --check
38
+ run: |
39
+ uv run --no-sync ruff check
40
+ uv run --no-sync ruff format --check
35
41
 
36
42
  - name: Static typing
37
- run: uv run pyright ./src
43
+ run: uv run --no-sync pyright ./src
38
44
 
39
45
  - name: Test (without PGO)
40
- run: |
41
- uv run pytest .
46
+ run: uv run --no-sync pytest
42
47
 
43
48
  test_pgo:
44
49
  runs-on: ${{ matrix.platform.runner }}
@@ -50,18 +55,16 @@ jobs:
50
55
  - runner: ubuntu-24.04-arm # aarch64
51
56
  - runner: macos-15-intel # x86_64
52
57
  - runner: macos-14 # aarch64
53
- python-version: ["3.9"]
54
58
  steps:
55
59
  - uses: actions/checkout@v3
56
60
  - name: Install uv
57
- uses: astral-sh/setup-uv@v5
61
+ uses: astral-sh/setup-uv@v7
58
62
  with:
59
- python-version: ${{ matrix.python-version }}
63
+ python-version: "3.10"
60
64
 
61
65
  - name: Install
62
66
  run: |
63
- uv venv
64
- uv pip install .[test,bench]
67
+ uv sync --locked --no-editable --extra pydantic --group test --group bench
65
68
  rustup component add llvm-tools-preview
66
69
 
67
70
  - name: Profile-Guided Optimization (PGO)
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 2025-10-25
4
+
5
+ Implement `interpn` convenience function that defers directly
6
+ to `raw` functions without serializable wrapper classes.
7
+
8
+ This enables use without pydantic for dep-constrained environments.
9
+
10
+ Contributions
11
+ * [Clément Robert](https://github.com/neutrinoceros)
12
+ * #40
13
+ * #41
14
+ * #42
15
+ * #44
16
+ * #45
17
+ * #46
18
+
19
+ ### Added
20
+
21
+ * Python
22
+ * Add type stubs for `raw` module
23
+ * Add `interpn` function that defers directly to `raw` functions without serializable wrapper classes
24
+
25
+ ### Changed
26
+
27
+ * Python
28
+ * !Move pydantic dep to `serde` optional group
29
+ * !Move optional dev dep groups to dependency groups (no longer installable via `.[dep]` syntax)
30
+ * !Import serializable wrapper classes into top level module only if pydantic is found
31
+ * !Drop support for python 3.9, which is leaving long-term support soon
32
+ * Update PGO profile data
33
+ * Rust
34
+ * Use abi3-py310 for python bindings
35
+
3
36
  ## 0.6.4 2025-10-24
4
37
 
5
38
  Implement N-dimensional nearest-neighbor interpolation on regular and rectilinear grids.
@@ -221,7 +221,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
221
221
 
222
222
  [[package]]
223
223
  name = "interpn"
224
- version = "0.6.4"
224
+ version = "0.7.0"
225
225
  dependencies = [
226
226
  "criterion",
227
227
  "crunchy",
@@ -435,9 +435,9 @@ dependencies = [
435
435
 
436
436
  [[package]]
437
437
  name = "proc-macro2"
438
- version = "1.0.86"
438
+ version = "1.0.103"
439
439
  source = "registry+https://github.com/rust-lang/crates.io-index"
440
- checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
440
+ checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
441
441
  dependencies = [
442
442
  "unicode-ident",
443
443
  ]
@@ -641,18 +641,28 @@ dependencies = [
641
641
 
642
642
  [[package]]
643
643
  name = "serde"
644
- version = "1.0.210"
644
+ version = "1.0.228"
645
+ source = "registry+https://github.com/rust-lang/crates.io-index"
646
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
647
+ dependencies = [
648
+ "serde_core",
649
+ "serde_derive",
650
+ ]
651
+
652
+ [[package]]
653
+ name = "serde_core"
654
+ version = "1.0.228"
645
655
  source = "registry+https://github.com/rust-lang/crates.io-index"
646
- checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
656
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
647
657
  dependencies = [
648
658
  "serde_derive",
649
659
  ]
650
660
 
651
661
  [[package]]
652
662
  name = "serde_derive"
653
- version = "1.0.210"
663
+ version = "1.0.228"
654
664
  source = "registry+https://github.com/rust-lang/crates.io-index"
655
- checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
665
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
656
666
  dependencies = [
657
667
  "proc-macro2",
658
668
  "quote",
@@ -661,14 +671,15 @@ dependencies = [
661
671
 
662
672
  [[package]]
663
673
  name = "serde_json"
664
- version = "1.0.143"
674
+ version = "1.0.145"
665
675
  source = "registry+https://github.com/rust-lang/crates.io-index"
666
- checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
676
+ checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
667
677
  dependencies = [
668
678
  "itoa",
669
679
  "memchr",
670
680
  "ryu",
671
681
  "serde",
682
+ "serde_core",
672
683
  ]
673
684
 
674
685
  [[package]]
@@ -679,9 +690,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
679
690
 
680
691
  [[package]]
681
692
  name = "syn"
682
- version = "2.0.75"
693
+ version = "2.0.108"
683
694
  source = "registry+https://github.com/rust-lang/crates.io-index"
684
- checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9"
695
+ checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
685
696
  dependencies = [
686
697
  "proc-macro2",
687
698
  "quote",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "interpn"
3
- version = "0.6.4"
3
+ version = "0.7.0"
4
4
  edition = "2024"
5
5
  authors = ["James Logan <jlogan03@gmail.com>"]
6
6
  license = "MIT OR Apache-2.0"
@@ -20,7 +20,7 @@ num-traits = { version = "0.2.19", default-features = false, features = ["libm"]
20
20
  crunchy = { version = "0.2.4", default-features = false, features = ["limit_256"] }
21
21
 
22
22
  # Python bindings
23
- pyo3 = { version = "0.27.1", features = ["extension-module", "abi3-py39", "generate-import-lib"], optional = true }
23
+ pyo3 = { version = "0.27.1", features = ["extension-module", "abi3-py310", "generate-import-lib"], optional = true }
24
24
  numpy = { version = "0.27.0", optional = true }
25
25
 
26
26
  # Test-only utils
@@ -1,37 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: interpn
3
- Version: 0.6.4
3
+ Version: 0.7.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
7
- Requires-Dist: numpy>=2
8
- Requires-Dist: pydantic>=2.12
9
- Requires-Dist: pytest>=8.4.2 ; extra == 'test'
10
- Requires-Dist: pytest-cov>=7.0.0 ; extra == 'test'
11
- Requires-Dist: ruff>=0.13.3 ; extra == 'test'
12
- Requires-Dist: pyright==1.1.337 ; extra == 'test'
13
- Requires-Dist: mktestdocs>=0.2.1 ; extra == 'test'
14
- Requires-Dist: scipy>=1.11.4 ; extra == 'test'
15
- Requires-Dist: matplotlib>=3.8 ; extra == 'test'
16
- Requires-Dist: scipy>=1.11.4 ; extra == 'bench'
17
- Requires-Dist: matplotlib>=3.8 ; extra == 'bench'
18
- Requires-Dist: memory-profiler>=0.61.0 ; extra == 'bench'
19
- Requires-Dist: mkdocs>=1.5.3 ; extra == 'doc'
20
- Requires-Dist: mkdocstrings-python>=1.7.5 ; extra == 'doc'
21
- Requires-Dist: mkdocs-material>=9.4.10 ; extra == 'doc'
22
- Provides-Extra: test
23
- Provides-Extra: bench
24
- Provides-Extra: doc
7
+ Requires-Dist: numpy>=1.21.2
8
+ Requires-Dist: pydantic>=2.2.0 ; extra == 'pydantic'
9
+ Provides-Extra: pydantic
25
10
  License-File: LICENSE-MIT
26
11
  License-File: LICENSE-APACHE
27
12
  Summary: N-dimensional interpolation/extrapolation methods
28
13
  Home-Page: https://github.com/jlogan03/interpn/
29
14
  Author-email: James Logan <jlogan03@gmail.com>
30
15
  License-Expression: MIT OR Apache-2.0
31
- Requires-Python: >=3.9
16
+ Requires-Python: >=3.10
32
17
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
33
18
  Project-URL: repository, https://github.com/jlogan03/interpn
34
19
  Project-URL: documentation, https://interpn.readthedocs.io/
20
+ Project-URL: changelog, https://github.com/jlogan03/interpn/blob/main/CHANGELOG.md
35
21
 
36
22
  # InterpN
37
23
 
@@ -53,6 +39,7 @@ effective when examining small numbers of observation points. See the
53
39
 
54
40
  | Feature →<br>↓ Interpolant Method | Regular<br>Grid | Rectilinear<br>Grid | Json<br>Serialization |
55
41
  |-----------------------------------|-----------------|---------------------|-----------------------|
42
+ | Nearest-Neighbor | ✅ | ✅ | ✅ |
56
43
  | Linear | ✅ | ✅ | ✅ |
57
44
  | Cubic | ✅ | ✅ | ✅ |
58
45
 
@@ -77,9 +64,9 @@ pip install interpn
77
64
 
78
65
  ## Profile-Guided Optimization
79
66
 
80
- To build the extension with profile-guided optimization using pre-built profiles, do `sh ./scripts/pgo_install.sh`.
81
- You can also generate your own PGO profiles like `sh ./scripts/pgo_profile.sh`.
82
- after installing these extra compiler dependencies:
67
+ To build the extension with profile-guided optimization using pre-built profiles, do `sh ./scripts/distr_pgo_install.sh`.
68
+ You can also generate your own PGO profiles like `sh ./scripts/distr_pgo_profile.sh`.
69
+ after installing this extra compiler dependency:
83
70
 
84
71
  ```bash
85
72
  rustup component add llvm-tools-preview
@@ -18,6 +18,7 @@ effective when examining small numbers of observation points. See the
18
18
 
19
19
  | Feature →<br>↓ Interpolant Method | Regular<br>Grid | Rectilinear<br>Grid | Json<br>Serialization |
20
20
  |-----------------------------------|-----------------|---------------------|-----------------------|
21
+ | Nearest-Neighbor | ✅ | ✅ | ✅ |
21
22
  | Linear | ✅ | ✅ | ✅ |
22
23
  | Cubic | ✅ | ✅ | ✅ |
23
24
 
@@ -42,9 +43,9 @@ pip install interpn
42
43
 
43
44
  ## Profile-Guided Optimization
44
45
 
45
- To build the extension with profile-guided optimization using pre-built profiles, do `sh ./scripts/pgo_install.sh`.
46
- You can also generate your own PGO profiles like `sh ./scripts/pgo_profile.sh`.
47
- after installing these extra compiler dependencies:
46
+ To build the extension with profile-guided optimization using pre-built profiles, do `sh ./scripts/distr_pgo_install.sh`.
47
+ You can also generate your own PGO profiles like `sh ./scripts/distr_pgo_profile.sh`.
48
+ after installing this extra compiler dependency:
48
49
 
49
50
  ```bash
50
51
  rustup component add llvm-tools-preview