PyCDFt 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,289 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyCDFt
3
+ Version: 0.1.0
4
+ Summary: CDF-t statistical downscaling / bias correction, vectorized over grid cells (pure numpy)
5
+ Author: PyCDFt contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/relmonta/pycdft
8
+ Project-URL: Repository, https://github.com/relmonta/pycdft
9
+ Project-URL: Issues, https://github.com/relmonta/pycdft/issues
10
+ Project-URL: Documentation, https://github.com/relmonta/pycdft/blob/main/docs/guide.html
11
+ Project-URL: Changelog, https://github.com/relmonta/pycdft/blob/main/CHANGELOG.md
12
+ Keywords: climate,downscaling,bias-correction,CDF-t,statistical-downscaling,geoscience
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
23
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: numpy>=1.20
28
+ Provides-Extra: gpu
29
+ Requires-Dist: torch>=2.0; extra == "gpu"
30
+ Provides-Extra: examples
31
+ Requires-Dist: matplotlib>=3.4; extra == "examples"
32
+ Provides-Extra: cross
33
+ Requires-Dist: ibicus>=1.1; extra == "cross"
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest>=7.0; extra == "test"
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=7.0; extra == "dev"
38
+ Requires-Dist: pyflakes>=3.0; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ # PyCDFt
42
+
43
+ **CDF-t statistical downscaling / bias correction, vectorized over grid cells
44
+ (pure numpy).**
45
+
46
+ **PyCDFt** is a generic, dependency-light implementation of the **CDF-t**
47
+ (Cumulative Distribution Function transform) method of
48
+ [Michelangeli, Vrac & Loukos (2009)](#references), with the delta-shift and
49
+ tail conventions of the R `CDFt` package and of
50
+ [ibicus](https://github.com/ecmwf-projects/ibicus). It operates on plain
51
+ numpy arrays — 1-D time series or `(T, N)` fields (any trailing dimensions
52
+ are treated as independent cells) — in one vectorized call, and is derived
53
+ from a production grid-scale implementation that has been run at
54
+ 1056 × 1056 cells × 29-year calibration × 86-year target.
55
+
56
+ ```python
57
+ import numpy as np
58
+ from pycdft import CDFt
59
+
60
+ rng = np.random.default_rng(7)
61
+ obs = rng.normal(0.0, 1.0, 1000) # observations (calibration period)
62
+ cm_hist = rng.normal(3.0, 1.0, 1000) # model, calibration period
63
+ cm_future = rng.normal(4.0, 1.0, 1000) # model, target period
64
+
65
+ model = CDFt(n_quantiles=1001, tail="linear", delta_shift="additive")
66
+ ds = model.fit_transform(obs, cm_hist, cm_future) # (1000,) downscaled series
67
+ ```
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ pip install . # from this repository (numpy only)
73
+ # or editable for development
74
+ pip install -e .[test]
75
+ ```
76
+
77
+ Requires Python ≥ 3.9 and `numpy>=1.20`. The core has **no other
78
+ dependencies** (scipy, xarray, pandas and matplotlib are never required;
79
+ matplotlib is only used by the optional `examples/`, ibicus only by the
80
+ optional cross-validation tests).
81
+
82
+ **Optional GPU backend.** `pip install .[gpu]` adds an optional torch-based
83
+ backend (`pycdft.gpu`) that mirrors this API and runs the same math on CUDA
84
+ / AMD ROCm / Apple MPS / CPU devices (numpy in, numpy out by default; the
85
+ results match the numpy backend to ~1e-15). See [docs/gpu.md](docs/gpu.md)
86
+ for the supported devices, the installation per hardware (CUDA / ROCm / CPU
87
+ torch builds), and the verified equivalence.
88
+
89
+ ## Documentation
90
+
91
+ - [docs/design.md](docs/design.md) — the math, conventions, design choices
92
+ and the measured comparison with the reference implementations;
93
+ - [docs/gpu.md](docs/gpu.md) — the optional torch GPU backend (`pycdft.gpu`);
94
+ - [docs/guide.html](docs/guide.html) — a plain-language companion guide
95
+ (no statistics background needed).
96
+
97
+ ## What is CDF-t?
98
+
99
+ CDF-t (Michelangeli et al. 2009) corrects both the distribution **and** its
100
+ change between the calibration and target periods, by defining the target
101
+ observation CDF as
102
+
103
+ ```
104
+ F_o^tar = F_o^cal ∘ (F_m^cal)^{-1} ∘ F_m^tar
105
+ ```
106
+
107
+ (here `m` = model, `o` = observations, `cal` = calibration period,
108
+ `tar` = target period, `F` = CDF and `q` = its inverse, the quantile
109
+ function), so that each model value `x` of the target period is mapped to
110
+
111
+ ```
112
+ y(x) = q_m^tar( F_m^cal( q_o^cal( F_m^tar(x) ) ) )
113
+ ```
114
+
115
+ where `F_m`, `F_o` are the model and observation CDFs, `q` the quantile
116
+ (inverse CDF) functions, `cal`/`tar` the calibration and target periods.
117
+ In practice the composition is evaluated on a uniform probability grid
118
+ `p = linspace(0, 1, Q)` (default `Q = 1001`, endpoints included): the
119
+ calibration mapping `R = F_m^cal(q_o^cal(p))` is computed once, and the
120
+ transfer curve `(x_grid, T) = (q_m^tar(p), q_m^tar(R))` is interpolated per
121
+ cell at the target values. See [docs/design.md](docs/design.md) for the
122
+ full math, conventions and a detailed comparison with the reference
123
+ implementations.
124
+
125
+ ### Conventions (matching the reference implementations)
126
+
127
+ | aspect | convention |
128
+ |---|---|
129
+ | ECDF | right-continuous step `F(x) = #{finite values ≤ x} / n` (NaNs excluded) — identical to the R `CDFt` package and to ibicus `ecdf_method="step_function"` |
130
+ | quantiles | type-7 linear (numpy default `method="linear"` = R `quantile(type=7)`), re-implemented bit-for-bit on pre-sorted arrays |
131
+ | delta shift | per-cell additive `x + (mean(obs) − mean(cm_hist))` (default) or multiplicative `x * (mean(obs) / mean(cm_hist))`, applied to the model series (calibration and target) *before* the transfer; `"none"` disables it (ibicus `"no_shift"`) |
132
+ | output frame | the shifted frame (the mean bias is removed, the model change calibration → target is preserved) |
133
+ | grid | `linspace(0, 1, Q)` with `Q = 1001`; the transfer is interpolated in x-space on the target's own value grid |
134
+ | tails | `"clip"` = constant at the transfer endpoints; `"linear"` = 30-rank windowed least-squares slope at the first/last unsaturated rank, capped at `2 ×` the median interior slope (default) |
135
+ | NaN | excluded from ECDF counts and quantile interpolation; NaN inputs pass through; cells with an empty (all-NaN) calibration map entirely to NaN |
136
+
137
+ ## Quick start
138
+
139
+ ```python
140
+ import numpy as np
141
+ from pycdft import CDFt
142
+
143
+ rng = np.random.default_rng(0)
144
+ obs, cm_hist, cm_future = (rng.normal(m, 1.0, 2000) for m in (0.0, 3.0, 4.0))
145
+
146
+ # 1-D series ---------------------------------------------------------------
147
+ ds = CDFt().fit_transform(obs, cm_hist, cm_future)
148
+
149
+ # (T, N) field: every cell (column) is corrected independently -------------
150
+ per_cell = np.linspace(-2.0, 2.0, 64) # per-cell spatial offset
151
+ obs2d, ch2d, cf2d = (rng.normal(0.0, 1.0, (1000, 64)) + per_cell * j
152
+ for j in (0, 3, 4)) # dataset bias grows with j
153
+ ds2d = CDFt().fit_transform(obs2d, ch2d, cf2d) # (1000, 64)
154
+
155
+ # options ------------------------------------------------------------------
156
+ ds_clip = CDFt(tail="clip").fit_transform(obs, cm_hist, cm_future)
157
+ ds_none = CDFt(delta_shift="none").fit_transform(obs, cm_hist, cm_future)
158
+ ds_hist = CDFt(use_histograms=True, n_bins=2000).fit_transform(obs, cm_hist,
159
+ cm_future)
160
+
161
+ # fit / transform separately (reuse the calibration) -----------------------
162
+ model = CDFt().fit(obs, cm_hist)
163
+ ds_a = model.transform(cm_future) # identical to fit_transform
164
+ cm_future2 = rng.normal(4.5, 1.0, 1000) # another scenario / member
165
+ ds_b = model.transform(cm_future2) # same calibration, new target
166
+
167
+ # one-shot functional API --------------------------------------------------
168
+ from pycdft import cdft_transform
169
+ ds = cdft_transform(obs, cm_hist, cm_future, n_quantiles=1001)
170
+ ```
171
+
172
+ ### Low-level API
173
+
174
+ The building blocks are exposed in `pycdft.math` (kernels) and `pycdft.core`
175
+ (pipeline). Every kernel accepts `(T, N)` arrays and is vectorized per column
176
+ (cell); `workers > 1` threads the per-cell kernels (results are identical,
177
+ numpy releases the GIL):
178
+
179
+ ```python
180
+ from pycdft import calibrate, apply_cdft
181
+ from pycdft.math import quantile_grid
182
+
183
+ p = quantile_grid(1001)
184
+ calib = calibrate(cm_hist, obs, p=p, delta_shift="additive")
185
+ # -> Calibration(R=(Q, N), delta=(N,), mode="additive", n_quantiles=1001)
186
+ pred = apply_cdft(cm_future, calib, p=p, tail="linear") # (T, N)
187
+ ```
188
+
189
+ `calibrate` takes the model first, the observations second (the reverse of
190
+ `CDFt.fit`). The histogram variants (`calibrate_hist`, `apply_cdft_hist`,
191
+ `use_histograms=True`) and the individual kernels are documented in
192
+ `pycdft.math` / `pycdft.core`.
193
+
194
+ ## Comparison with the reference implementations
195
+
196
+ PyCDFt follows the conventions of the R `CDFt` package and ibicus, so it
197
+ agrees closely with both in the middle of the distribution; the differences
198
+ are at the extremes (tail models) and in the exact grid:
199
+
200
+ | aspect | PyCDFt | R `CDFt` | ibicus | SBCK |
201
+ |---|---|---|---|---|
202
+ | composition | same | same | same | same (histogram margins) |
203
+ | ECDF / quantiles | step + type-7 | step + type-7 | configurable (step + linear in the tests) | rank-based + interp1d |
204
+ | delta shift | per-cell, 3 modes | additive only | per-series, 3 modes | per-column normalization |
205
+ | grid | p-grid Q=1001, x-space interp | value grid npas=1000, dev=2 | none (per value) | adaptive support, dsupp=1000 |
206
+ | tails | capped LSQ linear / clip | obs-tail copy + 0/1 padding | clamp | support extension |
207
+ | seasonality | none (a monthly mode exists in the production codebase this package is derived from) | none | 31-day + 17y/9y windows (default ON) | none |
208
+ | precipitation SSR | no | no | yes (Vrac et al. 2016) | no |
209
+ | NaN | robust | robust | not supported | n/a |
210
+ | grid scale | vectorized, chunked, cacheable | single series | per-location loop, full arrays | full arrays |
211
+
212
+ The measured agreement (interior RMSE ~0.005–0.012 vs ibicus; the residual
213
+ is the probability-grid discretization of the transfer curve) and the full
214
+ analysis of *where* the implementations differ are in
215
+ [docs/design.md](docs/design.md) §4, which is reproduced by
216
+ `pytest -m cross -s`.
217
+
218
+ ## Examples
219
+
220
+ Run from the repository root (with `pip install -e .`, or set
221
+ `PYTHONPATH=.`):
222
+
223
+ ```bash
224
+ python examples/example_r_gaussian.py # the R package's Gaussian example
225
+ python examples/example_skewed.py # non-Gaussian / skewed case
226
+ python examples/example_grid.py # small (T, N) grid with QQ plots
227
+ python examples/example_ibicus_compare.py # vs ibicus (needs `pip install ibicus`)
228
+ python examples/gpu_example.py # torch GPU backend (needs torch)
229
+ ```
230
+
231
+ Each example prints the summary statistics and saves figures to
232
+ `examples/figures/` when matplotlib is available.
233
+
234
+ ## Tests
235
+
236
+ ```bash
237
+ pip install -e .[test]
238
+ pytest # core suite (numpy only, no extras)
239
+ pytest -m cross # cross-validation vs ibicus + the R port
240
+ pytest -m "not cross" # core suite only (CI)
241
+ pytest -m gpu # torch GPU backend (skipped without torch)
242
+ ```
243
+
244
+ The core suite is pure numpy and does not require ibicus: the *ibicus*
245
+ cross tests skip automatically when ibicus is missing, while the R-port
246
+ cross tests need only numpy (R is not required — the R algorithm is ported
247
+ in `tests/r_cdft_reference.py`). The GPU tests are device-agnostic: they
248
+ run on CUDA / ROCm / MPS if available and always pass on CPU.
249
+
250
+ ## Limitations
251
+
252
+ - **Univariate**: each cell (series) is corrected independently; no
253
+ multivariate, spatial or temporal-consistency constraints are imposed.
254
+ - **No seasonality**: the calibration does not distinguish months or
255
+ seasons (a monthly mode exists in the production codebase this package
256
+ is derived from, but it is not part of PyCDFt).
257
+ - **No precipitation-specific handling**: the SSR (singularity stochastic
258
+ removal) zero-inflation of Vrac et al. (2016) is not implemented.
259
+ - **Histogram mode is approximate**: `use_histograms=True` and the `_hist`
260
+ functions trade a small accuracy for bounded memory (exact in the limit
261
+ of many bins; see `docs/design.md` §3.1).
262
+ - **No autocorrelation modelling**: each series is treated as a single
263
+ sample; temporal structure (daily/monthly persistence) is not modelled.
264
+
265
+ ## References
266
+
267
+ - Michelangeli, P.-A., Vrac, M. & Loukos, H. (2009). *Probabilistic
268
+ downscaling approaches: Application to wind cumulative distribution
269
+ functions.* Geophys. Res. Lett., 36, L11708.
270
+ doi:[10.1029/2009GL038401](https://doi.org/10.1029/2009GL038401)
271
+ - Vrac, M., Noël, T. & Vautard, R. (2016). *Bias correction of
272
+ precipitation through singularity stochastic removal: Method and
273
+ application to the CORDEX-Africa domain.* J. Geophys. Res. Atmos.
274
+ - Vrac, M. & Michelangeli, P.-A. (2021). *CDFt: Downscaling and bias
275
+ correction via CDF transform.* R package version 1.2, CRAN.
276
+ https://cran.r-project.org/package=CDFt
277
+ - Cucchi, M. et al. (2024). *ibicus: A Python package for statistical bias
278
+ correction and downscaling.* Geosci. Model Dev. (Apache-2.0)
279
+ https://github.com/ecmwf-projects/ibicus
280
+ - Robin, Y. (2018+). *SBCK: Statistical Bias Correction Kit.*
281
+ https://github.com/yrobink/SBCK (GPL-3, needs Eigen)
282
+
283
+ The R `CDFt` source is GPL (≥ 2); it is reproduced in the tests
284
+ (`tests/r_cdft_reference.py`) solely as a validation reference for the
285
+ Apache-2.0 PyCDFt package.
286
+
287
+ ## License
288
+
289
+ Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,15 @@
1
+ pycdft/__init__.py,sha256=Wa1UQ3qx4zk9NYTlcEKu2Wsb_39sAZviHWx-6s7l4M8,1977
2
+ pycdft/api.py,sha256=hRMoT0LSMW5l-ZgGAcrOvfAbqv2Ulxoh84yaCr7aiUw,8240
3
+ pycdft/core.py,sha256=8bjgogyiJvB9N-dZ2TQ7fubF94N8N8NDAWMUcKYgH4M,19558
4
+ pycdft/math.py,sha256=YwkJgWqQ5XM7yPFQTY5PYhBpst19YoPbvdn8AcNfX0w,23185
5
+ pycdft/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ pycdft/gpu/__init__.py,sha256=rypjrbebBu94pN2tWrZaJIoc0J12sMxlY7w19nAKCfk,1361
7
+ pycdft/gpu/_torch.py,sha256=307CKnLpz30ZVgHlqystVUeknNVFfi1j-N5uEXko3-8,1123
8
+ pycdft/gpu/api.py,sha256=ICESrFQxeZBgyBTU_YiocLPrwsNdq2HFdqbqzQHYu5Q,26723
9
+ pycdft/gpu/devices.py,sha256=XXPSi6IIbfybuZYIJXYtYU5TgiQis5evw94NUuKunBI,5613
10
+ pycdft/gpu/kernels.py,sha256=gK1mQJfJ_d6J84px7jsm4nnK8ywrxHM2c5XloD8iE-E,24128
11
+ pycdft-0.1.0.dist-info/licenses/LICENSE,sha256=z5wyulAKGastqOtBBmw9aiZyc95lCxFMP31PXSXnteQ,11349
12
+ pycdft-0.1.0.dist-info/METADATA,sha256=rQRPoyZGl0xMGgbw5tp401ns9JhU37iM8FRRxEZpVLI,13575
13
+ pycdft-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
14
+ pycdft-0.1.0.dist-info/top_level.txt,sha256=EHmdN2Sk9s6IQg5UZzEDRGp4R3AHfEYuK94Jgd8QPko,7
15
+ pycdft-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including the
49
+ original version of the Work and any modifications or additions to
50
+ that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 pycdft contributors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1 @@
1
+ pycdft