[SciPy-Dev] GSoC proposal draft: Add type hints on scipy.special

Gabriel Simonetto gabrielfranksimonetto at gmail.com
Sat Apr 3 12:31:50 EDT 2021


Hey Joshua, thanks for the answer!

I was looking into your points and I would like to ask for your opinion on
them:

1) For the Numpy versions, I couldn't understand why that is a problem for
the development phase, since I could work on my fork and change the numpy
dependency to point directly at numpy's master, rather than to an already
released version, would that be acceptable?

2) I was looking for how that would work and found the _generate_pyx.py
responsible for generating some automated stubs related to C code, but
haven't gotten very far with the f2py file. My problem with it is that
since the fortran functions aren't exposed, I don't understand how I should
declare that my stubs are referencing the functions instantiated on the
.pyf, is there such a thing as a .pyfi ?

I am sorry if my question implies a lack of understanding of both typing
and the f2py mechanisms, I am fairly new to these topics. It's a shame I
couldn't find your branch to better explore my shortcomings! Is there a
chance you know where it is?

So... I will try my best to enrich my proposal, but chances are that I
won't be able to make it so much better than it already is, given my lack
of experience, and that understanding type interactions would be something
that I would need to pick upon before the coding period starts.

I need to be honest about the fact that I don't already have the expertise
to do the job, and I would like to know if it's expected to pick things up
as the project happens, or if for this job in particular it wouldn't be
possible to learn so much stuff on so little time (or something like that)

Looking forward to any inputs, I appreciate the advice very much!



Em qui., 1 de abr. de 2021 às 00:15, Joshua Wilson <
josh.craig.wilson at gmail.com> escreveu:

> Hey Gabriel,
>
> One thing to consider is that a large chunk of special is ufuncs, and
> better ufunc typing is going to need PRs like
>
> https://github.com/numpy/numpy/pull/18417
>
> which aren't yet in a released version of NumPy. So you'll want to
> make sure the timing works out there.
>
> You mention .pyf files in the doc, they are an interesting case
> because ideally we'd be able to auto-generate stubs for them. I even
> have a languishing branch somewhere that has a start on doing that...
> there are a few complications because the objects exported by the pyf
> extension module are actually instances of one class, so you'd need to
> either fudge the typing a bit or use Generic a lot.
>
> I'd recommend thinking through how to handle the above complications
> and discussing that in the doc.
>
> - Josh (also the person142 mentioned in the doc)
>
> On Wed, Mar 31, 2021 at 5:42 PM Gabriel Simonetto
> <gabrielfranksimonetto at gmail.com> wrote:
> >
> > Hi everyone!
> >
> > I finished making a rough draft of what I would like to do for this
> year's gsoc, could someone give me some tips on how to improve it?
> >
> > In particular I would like to know if this is a good module for the
> project or if it would be better allocated elsewhere, and how could I make
> my timeline a bit sharper.
> >
> > Here is the link for adding comments:
> https://docs.google.com/document/d/1d3NkbQC9rBcoKkuOmsx95wYDO_OMA5m1PBSu_oiwQVw/edit?usp=sharing
> >
> > Thanks!
> > Gabriel Simonetto
> > _______________________________________________
> > SciPy-Dev mailing list
> > SciPy-Dev at python.org
> > https://mail.python.org/mailman/listinfo/scipy-dev
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scipy-dev/attachments/20210403/b8d36cc7/attachment.html>


More information about the SciPy-Dev mailing list