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
Get some kind of typing for scipy.special
#11749
Comments
With NumPy 1.20.0 I think the things we need (like There's two recent PRs that looked at type annotations, gh-10844 for The idea of using inline annotations in combination with The current issue is that Sphinx is generating warnings about inline annotations, see #10844 (comment).
|
Type annotations for other submodules are also welcome now - there's a lot to do. Easiest to keep it in stub files for now, gh-13833 is close to finalizing moving them inline. |
I'm going to start by changing the necessary annotations to ArrayLike in orthogonal.pyi then do basic.pyi |
Recently there was an update to the Most notably, it introduced a number of type-check-only ufunc subclasses, one for each combination of |
Hi. I'm new at contributing to open source and I'm really eager to it, so after reading some of the related issues and PRs (mainly #13833). I would like to try add the typing for the |
Hi @JPena-code , others my have different thoughts, but I think it makes sense to start with stubs - then you can always move them inline as a follow-up later. Feel free to ping me if you'd like any help with submitting a PR by the way! |
Almost all existing annotations are in stub files:
so adding more there seems like the right default for now. |
Great, thanks for the help @lucascolley, I will try to add the typing in a stub file |
This is a tracking issue for getting some kind of typing (likely very rough) for everything in
scipy.special
. Things that this entails:cython_special
asAny
, since it has no public Python API._ufuncs
as best we canAny
: MAINT: special: add rudimentary types for_ufuncs
extension module #11701np.ufunc
numpy/numpy-stubs#44 for an (admittedly not great) initial effort at more detailed types for ufuncsspecfun
..pyf
file; I have a local branch with an initial efforttype(sc.specfun.jdzo)
is<class 'fortran'>
. Since these functions aren't exposed publicly in any way (instead they are just used in_basic.py
mostly) we should likely just ignore that distinction._comb
etc.)orthogonal.py
_basic.py
The blocker here will likely be getting something forEDIT: this is included in NumPy 1.20ArrayLike
in the NumPy stubsmatplotlib
/pytest
/sympy
My hope is that the process of trying to type special will reveal the big things that need to be solved. Once we have solved them we might be ready to open up a big issue for "adding types to stuff" that will then be beginner friendly.
The text was updated successfully, but these errors were encountered: