[SciPy-Dev] Doubt regarding Docs

Ted Pudlik tpudlik at gmail.com
Sat Feb 11 14:23:47 EST 2017


The documentation of the functions in the `special` module is regrettably
somewhat scattered.  A small number are documented right by their
definitions, in
https://github.com/scipy/scipy/blob/master/scipy/special/basic.py.  Most,
however, have their docstrings defined in
https://github.com/scipy/scipy/blob/master/scipy/special/add_newdocs.py.
This includes the hypergeometric functions.

After changing the docstrings in add_newdocs.py, you will have to run
generate_ufuncs.py
<generate_ufuncs.pyhttps://github.com/scipy/scipy/blob/master/scipy/special/generate_ufuncs.py>
for the docstrings to actually become attached to the appropriate ufuncs
(and render in the html documentation).  It's customary to do this in a
separate commit, because it produces quite a bit of generated code.

If you are trying to find not the docstrings but the actual source code of
the functions, take a look at `generate_ufuncs.py`.  It contains lines such
as,

*    hyp1f1* -- *hyp1f1*_wrap: ddd->d, chyp1f1_wrap: ddD->D --
specfun_wrappers.h

which indicate that the hyp1f1 SciPy function wraps the specfun
implementation.  A look at `specfun_wrappers.c` will show that the original
specfun function is called `CHGM`; it is defined in
https://github.com/scipy/scipy/blob/master/scipy/special/specfun/specfun.f.
The documentation provided in the Fortran file is quite minimal (if still
more than what you can currently find in the SciPy docstrings).  However,
as the header of the specfun.f file informs you, these implementations
originally come from a book by Shanjie Zhang and Jianming Jin, "Computation
of Special Functions" (1996). If you have access to a university library,
you might be able to track down this book and find more information about
the implementation.

Hope this helps!
Ted

On Sat, Feb 11, 2017 at 10:30 AM ashwin.pathak <
ashwin.pathak at students.iiit.ac.in> wrote:

Dear developers,
I was trying to solve an issue related to the documentation of
hyper-geometric function, 2F1. But, I could not find the file in the
source code where 2F1 is addressed. Can someone help me find the file.
Issue #6966.
Thanks :)
_______________________________________________
SciPy-Dev mailing list
SciPy-Dev at scipy.org
https://mail.scipy.org/mailman/listinfo/scipy-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20170211/69b6f40f/attachment.html>


More information about the SciPy-Dev mailing list