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 to integrate.quadpack docstrings #8440

Merged
merged 4 commits into from Feb 19, 2018
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions scipy/integrate/quadpack.py
Expand Up @@ -560,6 +560,18 @@ def dblquad(func, a, b, gfun, hfun, args=(), epsabs=1.49e-8, epsrel=1.49e-8):
romb : integrator for sampled data
scipy.special : for coefficients and roots of orthogonal polynomials

Examples
--------

Calculate :math: double integration x*y**2
Copy link
Member

Choose a reason for hiding this comment

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

Stray :math: directive, please remove it.

Copy link
Member

Choose a reason for hiding this comment

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

Please wrap the expression into double backticks so that it renders as code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so instead of this line I am replacing it with "Returns double integration of x*y**2 "(without double quotes) . Is this correct @ev-br

Integrating over rectangle with x ranging from 0 to 2
and y ranging from 0 to 1

>>> from scipy import integrate
>>> f=lambda y,x: x*y**2
>>> integrate.dblquad(f,0,2,lambda x: 0,lambda x: 1)
(0.6666666666666667, 7.401486830834377e-15)

"""
def temp_ranges(*args):
return [gfun(args[0]), hfun(args[0])]
Expand Down