interpn 0.6.0__tar.gz → 0.6.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.
Files changed (78) hide show
  1. {interpn-0.6.0 → interpn-0.6.2}/.cargo/config.toml +1 -1
  2. {interpn-0.6.0 → interpn-0.6.2}/.github/workflows/release-python.yml +9 -20
  3. {interpn-0.6.0 → interpn-0.6.2}/.github/workflows/test-python.yml +2 -1
  4. {interpn-0.6.0 → interpn-0.6.2}/.github/workflows/test-rust.yml +3 -0
  5. {interpn-0.6.0 → interpn-0.6.2}/.gitignore +1 -0
  6. {interpn-0.6.0 → interpn-0.6.2}/CHANGELOG.md +36 -0
  7. {interpn-0.6.0 → interpn-0.6.2}/Cargo.lock +1 -1
  8. {interpn-0.6.0 → interpn-0.6.2}/Cargo.toml +2 -1
  9. {interpn-0.6.0 → interpn-0.6.2}/PKG-INFO +1 -1
  10. {interpn-0.6.0 → interpn-0.6.2}/docs/1d_quality_of_fit_Rectilinear.svg +148 -148
  11. {interpn-0.6.0 → interpn-0.6.2}/docs/1d_quality_of_fit_Regular.svg +2235 -2498
  12. {interpn-0.6.0 → interpn-0.6.2}/docs/2d_quality_of_fit_Rectilinear.svg +347 -336
  13. {interpn-0.6.0 → interpn-0.6.2}/docs/2d_quality_of_fit_Regular.svg +1634 -1679
  14. {interpn-0.6.0 → interpn-0.6.2}/docs/3d_throughput_vs_nobs.svg +199 -199
  15. {interpn-0.6.0 → interpn-0.6.2}/docs/3d_throughput_vs_nobs_prealloc.svg +199 -199
  16. {interpn-0.6.0 → interpn-0.6.2}/docs/4d_throughput_vs_nobs.svg +206 -199
  17. {interpn-0.6.0 → interpn-0.6.2}/docs/4d_throughput_vs_nobs_prealloc.svg +207 -200
  18. {interpn-0.6.0 → interpn-0.6.2}/docs/throughput_vs_dims_1000_obs.svg +141 -141
  19. {interpn-0.6.0 → interpn-0.6.2}/docs/throughput_vs_dims_1_obs.svg +126 -126
  20. {interpn-0.6.0 → interpn-0.6.2}/pyproject.toml +3 -2
  21. interpn-0.6.2/scripts/distr_pgo.sh +25 -0
  22. interpn-0.6.2/scripts/distr_pgo_install.sh +11 -0
  23. interpn-0.6.2/scripts/distr_pgo_profile.sh +20 -0
  24. interpn-0.6.2/scripts/native_pgo.sh +22 -0
  25. interpn-0.6.2/scripts/native_pgo_install.sh +6 -0
  26. interpn-0.6.0/scripts/pgo_profile.sh → interpn-0.6.2/scripts/native_pgo_profile.sh +4 -2
  27. interpn-0.6.2/scripts/pgo-profiles/pgo.profdata +0 -0
  28. {interpn-0.6.0 → interpn-0.6.2}/scripts/profile_workload.py +2 -2
  29. {interpn-0.6.0 → interpn-0.6.2}/src/multicubic/mod.rs +17 -5
  30. {interpn-0.6.0 → interpn-0.6.2}/src/multicubic/rectilinear.rs +6 -6
  31. {interpn-0.6.0 → interpn-0.6.2}/src/multicubic/rectilinear_recursive.rs +26 -4
  32. {interpn-0.6.0 → interpn-0.6.2}/src/multicubic/regular.rs +35 -5
  33. {interpn-0.6.0 → interpn-0.6.2}/src/multicubic/regular_recursive.rs +30 -9
  34. {interpn-0.6.0 → interpn-0.6.2}/src/multilinear/rectilinear.rs +6 -0
  35. {interpn-0.6.0 → interpn-0.6.2}/src/multilinear/rectilinear_recursive.rs +9 -2
  36. {interpn-0.6.0 → interpn-0.6.2}/src/multilinear/regular.rs +13 -3
  37. {interpn-0.6.0 → interpn-0.6.2}/src/multilinear/regular_recursive.rs +9 -3
  38. {interpn-0.6.0 → interpn-0.6.2}/src/one_dim/linear.rs +11 -1
  39. {interpn-0.6.0 → interpn-0.6.2}/uv.lock +1 -1
  40. interpn-0.6.0/scripts/pgo-profiles/interpn.profdata +0 -0
  41. interpn-0.6.0/scripts/pgo.sh +0 -10
  42. interpn-0.6.0/scripts/pgo_install.sh +0 -4
  43. {interpn-0.6.0 → interpn-0.6.2}/.github/workflows/release-rust.yml +0 -0
  44. {interpn-0.6.0 → interpn-0.6.2}/.readthedocs.yml +0 -0
  45. {interpn-0.6.0 → interpn-0.6.2}/LICENSE-APACHE +0 -0
  46. {interpn-0.6.0 → interpn-0.6.2}/LICENSE-MIT +0 -0
  47. {interpn-0.6.0 → interpn-0.6.2}/README.md +0 -0
  48. {interpn-0.6.0 → interpn-0.6.2}/benches/bench.rs +0 -0
  49. {interpn-0.6.0 → interpn-0.6.2}/benches/bench_cpu.py +0 -0
  50. {interpn-0.6.0 → interpn-0.6.2}/benches/bench_mem.py +0 -0
  51. {interpn-0.6.0 → interpn-0.6.2}/docs/API_Docs.md +0 -0
  52. {interpn-0.6.0 → interpn-0.6.2}/docs/index.md +0 -0
  53. {interpn-0.6.0 → interpn-0.6.2}/docs/perf.md +0 -0
  54. {interpn-0.6.0 → interpn-0.6.2}/docs/ram_vs_dims.svg +0 -0
  55. {interpn-0.6.0 → interpn-0.6.2}/docs/requirements.txt +0 -0
  56. {interpn-0.6.0 → interpn-0.6.2}/examples/cubic_comparison.py +0 -0
  57. {interpn-0.6.0 → interpn-0.6.2}/mkdocs.yml +0 -0
  58. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/__init__.py +0 -0
  59. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/multicubic_rectilinear.py +0 -0
  60. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/multicubic_regular.py +0 -0
  61. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/multilinear_rectilinear.py +0 -0
  62. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/multilinear_regular.py +0 -0
  63. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/py.typed +0 -0
  64. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/raw.py +0 -0
  65. {interpn-0.6.0 → interpn-0.6.2}/src/interpn/serialization.py +0 -0
  66. {interpn-0.6.0 → interpn-0.6.2}/src/lib.rs +0 -0
  67. {interpn-0.6.0 → interpn-0.6.2}/src/multilinear/mod.rs +0 -0
  68. {interpn-0.6.0 → interpn-0.6.2}/src/one_dim/hold.rs +0 -0
  69. {interpn-0.6.0 → interpn-0.6.2}/src/one_dim/mod.rs +0 -0
  70. {interpn-0.6.0 → interpn-0.6.2}/src/python.rs +0 -0
  71. {interpn-0.6.0 → interpn-0.6.2}/src/testing.rs +0 -0
  72. {interpn-0.6.0 → interpn-0.6.2}/src/utils.rs +0 -0
  73. {interpn-0.6.0 → interpn-0.6.2}/test/test_docs.py +0 -0
  74. {interpn-0.6.0 → interpn-0.6.2}/test/test_examples.py +0 -0
  75. {interpn-0.6.0 → interpn-0.6.2}/test/test_multicubic_rectilinear.py +0 -0
  76. {interpn-0.6.0 → interpn-0.6.2}/test/test_multicubic_regular.py +0 -0
  77. {interpn-0.6.0 → interpn-0.6.2}/test/test_multilinear_rectilinear.py +0 -0
  78. {interpn-0.6.0 → interpn-0.6.2}/test/test_multilinear_regular.py +0 -0
@@ -1,2 +1,2 @@
1
- [target.'cfg(target_arch = "x86_64")']
1
+ [target.'cfg(any(target_arch = "x86_64", target_arch = "x64"))']
2
2
  rustflags = ["-C", "target-feature=+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+cmpxchg16b,+avx,+avx2,+fma,+bmi1,+bmi2,+lzcnt,+pclmulqdq,+movbe"]
@@ -37,20 +37,17 @@ jobs:
37
37
  target: s390x
38
38
  - runner: ubuntu-22.04
39
39
  target: ppc64le
40
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
40
+ python-version: ["3.13"] # Using stable abi3-py39
41
41
  steps:
42
42
  - uses: actions/checkout@v4
43
43
  - uses: actions/setup-python@v5
44
44
  - name: Build wheels
45
45
  uses: PyO3/maturin-action@v1
46
- env:
47
- RUSTFLAGS: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
48
46
  with:
49
47
  target: ${{ matrix.platform.target }}
50
- args: --release --out dist --find-interpreter -j 1
48
+ args: --release --out dist --find-interpreter --verbose -- "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/pgo.profdata"
51
49
  # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
52
50
  manylinux: auto
53
- # rust-flags: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
54
51
  - name: Upload wheels
55
52
  uses: actions/upload-artifact@v4
56
53
  with:
@@ -70,20 +67,18 @@ jobs:
70
67
  target: aarch64
71
68
  - runner: ubuntu-22.04
72
69
  target: armv7
73
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
70
+ python-version: ["3.13"] # Using stable abi3-py39
74
71
  steps:
75
72
  - uses: actions/checkout@v4
76
73
  - uses: actions/setup-python@v5
77
74
  - name: Build wheels
78
75
  uses: PyO3/maturin-action@v1
79
- env:
80
- RUSTFLAGS: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
81
76
  with:
82
77
  target: ${{ matrix.platform.target }}
83
- args: --release --out dist --find-interpreter
78
+ # PGO profile specified in maturin args because passing rustflags wipes out x86_64 instruction sets
79
+ args: --release --out dist --find-interpreter --verbose -- "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/pgo.profdata"
84
80
  # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
85
81
  manylinux: musllinux_1_2
86
- # rust-flags: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
87
82
  - name: Upload wheels
88
83
  uses: actions/upload-artifact@v4
89
84
  with:
@@ -99,7 +94,7 @@ jobs:
99
94
  target: x64
100
95
  - runner: windows-latest
101
96
  target: x86
102
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
97
+ python-version: ["3.13"] # Using stable abi3-py39
103
98
  steps:
104
99
  - uses: actions/checkout@v4
105
100
 
@@ -114,13 +109,10 @@ jobs:
114
109
  python-version: ${{ matrix.python-version }}
115
110
  - name: Build wheels
116
111
  uses: PyO3/maturin-action@v1
117
- env:
118
- RUSTFLAGS: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
119
112
  with:
120
113
  target: ${{ matrix.platform.target }}
121
- args: --release --out dist
114
+ args: --release --out dist --verbose -- "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/pgo.profdata"
122
115
  # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
123
- # rust-flags: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
124
116
  - name: Upload wheels
125
117
  uses: actions/upload-artifact@v4
126
118
  with:
@@ -136,19 +128,16 @@ jobs:
136
128
  target: x86_64
137
129
  - runner: macos-14
138
130
  target: aarch64
139
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
131
+ python-version: ["3.13"] # Using stable abi3-py39
140
132
  steps:
141
133
  - uses: actions/checkout@v4
142
134
  - uses: actions/setup-python@v5
143
135
  - name: Build wheels
144
136
  uses: PyO3/maturin-action@v1
145
- env:
146
- RUSTFLAGS: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
147
137
  with:
148
138
  target: ${{ matrix.platform.target }}
149
- args: --release --out dist --find-interpreter
139
+ args: --release --out dist --find-interpreter --verbose -- "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/pgo.profdata"
150
140
  # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
151
- # rust-flags: "-Cprofile-use=${{github.workspace}}/scripts/pgo-profiles/interpn.profdata -Cmetadata=interpn_pgo"
152
141
  - name: Upload wheels
153
142
  uses: actions/upload-artifact@v4
154
143
  with:
@@ -55,12 +55,13 @@ jobs:
55
55
  - name: Install
56
56
  run: |
57
57
  uv venv
58
+ uv pip install .[test,bench]
58
59
  rustup component add llvm-tools-preview
59
60
 
60
61
  - name: Profile-Guided Optimization (PGO)
61
62
  shell: bash
62
63
  run: |
63
- sh ./scripts/pgo_install.sh
64
+ sh ./scripts/distr_pgo_install.sh
64
65
 
65
66
  - name: Test (with PGO)
66
67
  run: |
@@ -32,6 +32,9 @@ jobs:
32
32
  - name: Run tests
33
33
  run: cargo test
34
34
 
35
+ - name: Run tests with FMA
36
+ run: cargo test --features=fma
37
+
35
38
  - name: Test no-std
36
39
  run: |
37
40
  rustup target add thumbv7em-none-eabihf
@@ -76,6 +76,7 @@ docs/_build/
76
76
 
77
77
  # Unmerged PGO profiles
78
78
  *.profraw
79
+ *native.profdata
79
80
 
80
81
  # cargo-semver-checks
81
82
  semver-checks/
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.2 2025-10-20
4
+
5
+ Add optional use of fused multiply-add, enabled for python distributions.
6
+ This substantially improves floating-point roundoff; cubic method now shows
7
+ O(1e-14) peak roundoff error even under extrapolation of a quadratic function,
8
+ and 0-4 epsilon roundoff inside interpolating region.
9
+ Overall effect on throughput performance is neutral.
10
+
11
+ ### Added
12
+
13
+ * Rust
14
+ * Add `fma` feature
15
+
16
+ ### Changed
17
+
18
+ * Rust
19
+ * Use Horner's method for evaluating normalized cubic hermite spline
20
+ * If `fma` feature is enabled, use FMA in cubic and linear methods where possible
21
+ * Python
22
+ * Enable `fma` feature for python distribution
23
+ * Update pgo profile data and benchmark plots
24
+
25
+ ## 0.6.1 2025-10-10
26
+
27
+ ### Changed
28
+
29
+ * Python
30
+ * Pass PGO profile-use argument for rustc via maturin args instead of RUSTFLAGS to avoid overriding flags set in .cargo/config.toml
31
+ * Split PGO scripts into native and distribution variants
32
+ * Distribution variant tests the exact build configuration used for distribution
33
+ * Native variant builds with target-cpu=native to enable all available instruction sets
34
+ * Update baked PGO profile based on distribution build
35
+ * Only run pypi distribution for single python version, because ABI3 build is portable to later python versions
36
+ * Rust
37
+ * Add x64 to platforms where extra instruction sets are enabled in .cargo/config.toml to capture windows 64-bit x86
38
+
3
39
  ## 0.6.0 2025-10-05
4
40
 
5
41
  Combine python bindings project into rust crate to streamline development process.
@@ -221,7 +221,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
221
221
 
222
222
  [[package]]
223
223
  name = "interpn"
224
- version = "0.6.0"
224
+ version = "0.6.2"
225
225
  dependencies = [
226
226
  "criterion",
227
227
  "crunchy",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "interpn"
3
- version = "0.6.0"
3
+ version = "0.6.2"
4
4
  edition = "2024"
5
5
  authors = ["James Logan <jlogan03@gmail.com>"]
6
6
  license = "MIT OR Apache-2.0"
@@ -35,6 +35,7 @@ ndarray = "0.16.1"
35
35
  default = ["std"]
36
36
  python = ["numpy", "pyo3", "std"]
37
37
  std = ["itertools"]
38
+ fma = []
38
39
 
39
40
  [profile.release]
40
41
  opt-level = 3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: interpn
3
- Version: 0.6.0
3
+ Version: 0.6.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy