Skip to content
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

DOC: add Examples and fix docstring for special.airye #11969

Merged
merged 7 commits into from
May 6, 2020

Conversation

AtsushiSakai
Copy link
Member

Reference issue

fix a part of #7168

What does this implement/fix?

add Examples and fix docstring for special.airye()

@miladsade96 miladsade96 added Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.special labels Apr 29, 2020
@ilayn
Copy link
Member

ilayn commented Apr 29, 2020

You might want to use the OOP style as matplotlib fols recommend its usage

from scipy.special import airye
import matplotlib.pyplot as plt
z = np.linspace(40, 200)
eAi, eAip, eBi, eBip = airye(x)
f, ax = plt.subplots(2, 1, sharex=True)
for ind, data in enumerate([[eAi, eBi, ["eAi", "eBi"]],
                            [eAip, eBip, ["eAip", "eBip"]]]):
    ax[ind].plot(z, data[0], "-r", z, data[1], "-b")
    ax[ind].legend(data[2])
    ax[ind].grid()

Copy link
Member

@person142 person142 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interesting thing about these functions is the “exponentially scaled” bit, so for an example I would want to see something that compares them to the normal Airy functions so that you can see what they are exponentially scaled compared to.

@pv
Copy link
Member

pv commented Apr 29, 2020

And maybe some example where the usual non-scaled functions under/overflow whereas the exponentially scaled ones do not, so that the reason for the existence of these functions becomes clearer.

@AtsushiSakai
Copy link
Member Author

Thank you guys for reviewing and comments. I updated it based on your feedbacks. PTAL.

@AtsushiSakai
Copy link
Member Author

Close and reopen to rerun CI

@AtsushiSakai AtsushiSakai reopened this May 1, 2020
scipy/special/add_newdocs.py Outdated Show resolved Hide resolved
@ilayn
Copy link
Member

ilayn commented May 6, 2020

This is quite nice now. Thanks @AtsushiSakai @pv

@ilayn ilayn merged commit 83a1a2e into scipy:master May 6, 2020
@AtsushiSakai AtsushiSakai deleted the issue_7168_1 branch May 6, 2020 22:20
@tylerjereddy tylerjereddy added this to the 1.5.0 milestone May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.special
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants