-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix HRPOpt.optimize() crash on scipy >= 1.18 (removed _LINKAGE_METHODS) #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| cvxpy>=1.1.19 | ||
| numpy>=1.0.0 | ||
| pandas>=0.19 | ||
| numpy>=1.26.0,<3.0.0 | ||
| pandas>=1.0.0,<4.0.0 | ||
|
Comment on lines
+2
to
+3
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also synced requirements.txt's numpy/pandas bounds to match pyproject.toml (numpy>=1.0.0/pandas>=0.19 → numpy>=1.26.0,<3.0.0/pandas>=1.0.0,<4.0.0), found while checking dependency consistency, pip install -r requirements.txt was pulling much older, unsupported versions than the package actually requires. |
||
| scikit-base<0.14.0 | ||
| scikit-learn>=0.24.1 | ||
| scipy>=1.3.0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the precheck entirely. scipy.cluster.hierarchy.linkage() already validates method internally (confirmed by reading scipy's current source: if method not in _LINKAGE_METHODS: raise ValueError(f"Invalid method: {method}"), that dict just isn't exposed as a module attribute anymore. Letting linkage() do its own validation means this doesn't re-break on a future scipy internal refactor.