BiorthBasis parameter 'subsamp' and 'samplesz' are duplicates!#222
Conversation
There was a problem hiding this comment.
Pull request overview
Aligns the configuration key used to set the number of bootstrap subsamples for coefficient covariance: pyEXP/expui BiorthBasis-derived classes (Spherical, Cylindrical, FlatDisk, Cube) now accept samplesz in addition to the legacy subsamp key, matching the convention already used in the EXP runtime (src/Cube.cc, src/Cylinder.cc, src/AxisymmetricBasis.cc). Use of subsamp still works but emits a deprecation warning, and the top-level pyEXP covariance documentation is updated to refer to samplesz.
Changes:
- Parse
samplesz(aftersubsamp, so it takes precedence) inSpherical,Cylindrical,FlatDisk, andCubeinitializers. - Emit a deprecation warning when the legacy
subsampkey is supplied; also relabel the existingeof_filewarning prefix fromCylindertoCylindrical. - Update the top-level covariance docstring in
pyEXP/BasisWrappers.ccto describesamplesz(and renamesubsamptosampleszin the returned-array dimension description).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| expui/BiorthBasis.cc | Adds samplesz parsing alongside subsamp plus deprecation warnings in four BiorthBasis classes; fixes one warning prefix. |
| pyEXP/BasisWrappers.cc | Renames subsamp → samplesz in the general covariance documentation block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
BiorthBasis parameter 'subsamp' by 'samplesz' are duplicatesBiorthBasis parameter 'subsamp' and 'samplesz' are duplicates!
|
Thanks, and I like the deprecation warning. I think we had loosely been trying to enforce a policy where we specify that the next minor release will deprecate the feature, so we could be explicit here (e.g. |
|
Ah, you are right. I'll add 7.11 to the warning. To be helpful, we could convert these same deprecation warnings to exceptions at 7.11. |
Summary
As identified by @jngaravitoc, we use both
subsampandsamplesz, in pyEXP and EXP respectively, to indicate the number of bootstrap subsamples for covariance estimation.Changes
These should be the same. This PR replaces
subsampbysampleszwhile still allowingsubsampand emits a deprecation warning ifsubsampis used.pyEXP docstrings updated for consistency with this change.