-
-
Notifications
You must be signed in to change notification settings - Fork 25
🐛 cluster.hierarchy: use generic return type for DisjointSet.__getitem__
#992
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
Conversation
|
cluster.hierarchy: use generic return type for DisjointSet.__getitem__
|
Thanks for this! Could you also add a quick little type-test for this in https://github.com/scipy/scipy-stubs/tree/master/tests , to confirm that it's now working as intended? It would also help me understand it a bit better haha. |
|
Yes I will do this, and I will also address the incorrect type in |
|
...and an issue with |
|
I made a small change to the signature to leave But I now see that the test matrix fails for |
Removing that default would break backwards compatibility. Using |
The problem is that before NumPy 2.1, there was an issue in NumPy's bundled stubs where the It's easy to work around though, i.e. set |
|
Ok I think this is now in a reviewable state again. |
|
This is looking very good; thanks Jake! |
Addresses #991