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: special.itairy example #17374

Merged
merged 3 commits into from Nov 10, 2022
Merged

DOC: special.itairy example #17374

merged 3 commits into from Nov 10, 2022

Conversation

dschmitz89
Copy link
Contributor

Reference issue

#7168

What does this implement/fix?

Example for special.itairy

@dschmitz89 dschmitz89 changed the title DOC: special.itairay example [skip cirrus][skip actions] DOC: special.itairay example Nov 8, 2022
@j-bowhay j-bowhay added scipy.special Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org labels Nov 8, 2022
@WarrenWeckesser
Copy link
Member

Thanks @dschmitz89.

In the code to generate the plot, you create a new array x with length 500, but you don't call itairy with it to generate the data for the plot, so the code is trying to plot with the new x and the old values of apt, etc.

@WarrenWeckesser
Copy link
Member

Also, in the plot labels, you have the character sequences \i and \,. In some versions of Python, these unrecognized escape sequences generate a warning or error, and so the test job fails. You should be able to fix that by changing the opening triple-quote of the docstring to r""" (i.e. make the docstring a raw string).

@WarrenWeckesser WarrenWeckesser changed the title DOC: special.itairay example DOC: special.itairy example Nov 9, 2022
@WarrenWeckesser
Copy link
Member

FYI: The lint failure is because of this:

add_newdoc("itairy",
    r"""
    itairy(x, out=None)

We can either ignore it (because most of the other calls of add_newdoc() in this file follow the same pattern, and this change is not actually changing the existing style), or make another small adjustment to make flake8 happy:

add_newdoc(
    "itairy",
    r"""
    itairy(x, out=None)

The relevant guideline from PEP 8 that flake8 is complaining about is the rule about "hanging indents" discussed in the section on Code Lay-out.

@ev-br
Copy link
Member

ev-br commented Nov 9, 2022

FWIW, I'd suggest ignoring the lint complaint here to keep the style uniform.

Copy link
Member

@tupui tupui left a comment

Choose a reason for hiding this comment

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

LGTM and CI is happy. Thanks @dschmitz89 et al for having a look.

@tupui tupui merged commit 950e497 into scipy:main Nov 10, 2022
@tupui tupui added this to the 1.10.0 milestone Nov 10, 2022
@dschmitz89 dschmitz89 deleted the itairy_doc branch November 10, 2022 20:52
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.

None yet

5 participants