diff options
Diffstat (limited to 'numpy/doc/example.py')
-rw-r--r-- | numpy/doc/example.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/numpy/doc/example.py b/numpy/doc/example.py index 75542596f..c9023765e 100644 --- a/numpy/doc/example.py +++ b/numpy/doc/example.py @@ -22,29 +22,24 @@ import os # standard library imports first # # If you prefer the use of abbreviated module names, we suggest the # convention used by NumPy itself:: -# -# import numpy as np -# import scipy as sp -# import matplotlib as mpl -# import matplotlib.pyplot as plt -# + +import numpy as np +import scipy as sp +import matplotlib as mpl +import matplotlib.pyplot as plt + # These abbreviated names are not to be used in docstrings; users must # be able to paste and execute docstrings after importing only the # numpy module itself, unabbreviated. -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') : """A one-line summary that does not use variable names or the function name. - Several sentences providing an extended description. You can put - text in mono-spaced type like so: ``var``. + Several sentences providing an extended description. Refer to + variables using back-ticks, e.g. `var`. Parameters ---------- |