Skip to content

fix: replace bare except and generic Exception with specific types#105

Open
mshzy wants to merge 1 commit into
ddbourgin:masterfrom
mshzy:fix/exceptions
Open

fix: replace bare except and generic Exception with specific types#105
mshzy wants to merge 1 commit into
ddbourgin:masterfrom
mshzy:fix/exceptions

Conversation

@mshzy

@mshzy mshzy commented Jun 2, 2026

Copy link
Copy Markdown

3 bare except → specific types, 2 raise Exception → ValueError/RuntimeError

@mshzy mshzy force-pushed the fix/exceptions branch from b85cc70 to d0e9ccb Compare June 2, 2026 02:26
…ssion

- LinearRegression: fix np.squeeze producing 0-d weights when N=1 (fixes ddbourgin#77)
- DecisionTree: handle empty child splits to prevent ZeroDivisionError (fixes ddbourgin#58)
- KNN: add epsilon to prevent division by zero when distance=0
- BayesianRegression: replace np.linalg.inv with pinv for numerical stability
- GP: replace bare except with ImportError for scipy import
@mshzy mshzy force-pushed the fix/exceptions branch from d0e9ccb to 193e20b Compare June 2, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant