feat: docs restructure, show_versions, remove 1e-10 zero guards#5
Merged
feat: docs restructure, show_versions, remove 1e-10 zero guards#5
Conversation
Provides Elvers, Polars, Python, platform, and architecture info in a single call for bug reports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Issue templates: bug report, feature request, new operator - CODE_OF_CONDUCT.md (Contributor Covenant v2.1) - SECURITY.md with scope definition - Enhanced PR template with review criteria Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CLAUDE.md: AI memo only (conduct, architecture, known limitations) - CONTRIBUTING.md: human contributor guide (workflow, invariants, rationale) - README.md: concise usage with design invariants - OPERATORS.md: updated zero-handling descriptions - Removed duplication across files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[NUMERICAL] Pure divisions (divide, inverse): guard removed entirely. Inf -> null flows through Factor constructor. Statistical operators (zscore, scale, normalize, signal, etc.): threshold changed from < 1e-10 to == 0. Degenerate cases (constant series) still return semantic defaults (0.0). Regression operators (ts_regression, vector_neut, regression_neut): threshold changed from < 1e-10 to == 0. Test tolerances: removed hardcoded abs=1e-10 where pytest.approx defaults are sufficient. Impact: eliminates silent data loss from legitimate small values. Near-zero denominators now produce large but finite values; use winsorize/truncate to handle outliers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed interval parameter from load(). The balanced panel skeleton is now built from the union of all timestamps present in the data, not from a generated datetime_range. This eliminates frequency inference and correctly handles weekends, holidays, and irregular trading calendars without generating spurious all-null rows. Added _check_intervals() to warn about irregular timestamp spacing. Added timestamp type validation (must be pl.Date or pl.Datetime). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change Type
Numerical Impact
Eliminates silent data loss from legitimate small values.
Testing
pytest tests/ -v) -- 141 passedruff check elvers/)