"""This is the docstring for the example.py module. Modules names should have short, all-lowercase names. The module name may have underscores if this improves readability. Every module should have a docstring at the very top of the file. The module's docstring may extend over multiple lines. If your docstring does extend over multiple lines, the closing three quotation marks must be on a line by itself, preferably preceeded by a blank line. """ import os # standard library imports first import numpy as np # related third party imports next import scipy as sp # imports should be at the top of the module import matplotlib as mpl # imports should usually be on separate lines import matplotlib.pyplot as plt from my_module import my_func, other_func def foo(var1, var2, long_var_name='hi') : """One-line summary or signature. Several sentences providing an extended description. You can put text in mono-spaced type like so: ``var``. Parameters ---------- var1 : array_like Array_like means all those objects -- lists, nested lists, etc. -- that can be converted to an array. var2 : integer Write out the full type long_variable_name : {'hi', 'ho'}, optional Choices in brackets, default first when optional. Returns ------- named : type Explanation list Explanation of Explanation outputs even more explaining Other Parameters ---------------- only_seldom_used_keywords : type Explanation common_parametrs_listed_above : type Explanation Raises ------ BadException Because you shouldn't have done that. See Also -------- otherfunc : relationship (optional) newfunc : relationship (optional) Notes ----- Notes about the implementation algorithm (if needed). This can have multiple paragraphs as can all sections. You may include some math: .. math:: X(e^{j\omega } ) = x(n)e^{ - j\omega n} And even use a greek symbol like :math:`omega` inline. References ---------- Cite the relevant literature, e.g. [1]_. You may also cite these references in the notes section above. .. [1] O. McNoleg, "The integration of GIS, remote sensing, expert systems and adaptive co-kriging for environmental habitat modelling of the Highland Haggis using object-oriented, fuzzy-logic and neural-network techniques," Computers & Geosciences, vol. 22, pp. 585-588, 1996. Examples -------- These are written in doctest format, and should illustrate how to use the function. >>> a=[1,2,3] >>> print [x + 3 for x in a] [4, 5, 6] >>> print "a\n\nb" a b """ pass