Skip to content

safe divide in scaler.py#20

Merged
cpoli merged 5 commits intov1.0.xfrom
bug_fix_1
May 5, 2026
Merged

safe divide in scaler.py#20
cpoli merged 5 commits intov1.0.xfrom
bug_fix_1

Conversation

@shreeeli
Copy link
Copy Markdown
Collaborator

@shreeeli shreeeli commented May 5, 2026

No description provided.

cpoli and others added 4 commits April 7, 2026 13:13
add link to documentation in README.md
- StandardScaler: handle zero-variance/null columns (ZeroDivisionError fix)
- DropHighNaNRatio: rename threshold= -> max_ratio= in docs and examples
- VarianceFilter: rename threshold= -> min_var= in docs and examples
- CorrelationFilter: rename threshold= -> max_corr= in docs and examples
- Pipeline: use keyword arg steps=[...] instead of positional list in docs and tests
…umns

When a column has equal min and max values (zero range), computing
1.0 / (max - min) raises ZeroDivisionError. Apply the same guard
pattern used in StandardScaler: set scale to 0.0 for constant or
all-null columns instead of dividing by zero.
@shreeeli shreeeli requested a review from cpoli May 5, 2026 10:21
@shreeeli shreeeli self-assigned this May 5, 2026
@shreeeli shreeeli added bug Something isn't working documentation Improvements or additions to documentation labels May 5, 2026
@cpoli cpoli merged commit a7650df into v1.0.x May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants