-
-
Notifications
You must be signed in to change notification settings - Fork 24
✨ linalg: improved basic solve* annotations
#741
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
33ad95b to
7dc9fad
Compare
|
This somehow causes the type-tests for As can be seen in the CI output, this affects both pyright (the lint job) and basedpyright (the typetest jobs) in the exact same way. For reference, here's the full pyright output: Note that update Replacing the contents of import numpy as np
from scipy.linalg import solve
i8_2d: np.ndarray[tuple[int, int], np.dtype[np.int8]]
solve(i8_2d, i8_2d)update 2 Running So the changes in this PR are problematic for pyright's runtime. My guess is that this is what's triggering this bug, especially considering that the false-positives are reported in But to be honest, I have no idea how timing could trigger this bug when we're not using update 3 After several hours of looking for a workaround, I almost decided to give up, but then ran $ uv run pyright --threads=2
0 errors, 0 warnings, 0 informations
$ basedpyright --threads=2
0 errors, 0 warnings, 0 notesThis suggests that it less likely that there's a confounder, i.e. that the slow analysis is what's triggering the bug. But there's one thing I know for sure: The more I look into this, the less I understand about it 😅 |
|
I'll try to get pyright's analysis time down first, as it's bad for DX. Perhaps by doing that, the bug will "solve" itself. But if not, then there's still the |
3c8c2dc to
b040ba1
Compare
|
I don't how why exactly, but but removing the overloads for the |
This improves the following "basic"
scipy.linalgfunctions:solvesolve_triangularsolve_bandedsolveh_bandedsolve_toeplitzsolve_circulantA total of 240 type-tests have been added for these functions.