summaryrefslogtreecommitdiff
path: root/doc/HOWTO_DOCUMENT.rst.txt
diff options
context:
space:
mode:
authorRobert Kern <robert.kern@gmail.com>2011-04-01 17:48:39 -0500
committerCharles Harris <charlesr.harris@gmail.com>2011-04-01 20:25:17 -0600
commitd44e74df3d31dfcd37eeef11bf5af14189c42433 (patch)
treebbaac738d82d5a2ee0c3bb567a89c7f263d43291 /doc/HOWTO_DOCUMENT.rst.txt
parent99836f38289ed77b635a066e0ce4c7fa8aa5848d (diff)
downloadnumpy-d44e74df3d31dfcd37eeef11bf5af14189c42433.tar.gz
DOC: Remove the advice to 'import scipy as sp' from the documentation.
Correct a statement about how doctest namespaces are initialized in scipy.
Diffstat (limited to 'doc/HOWTO_DOCUMENT.rst.txt')
-rw-r--r--doc/HOWTO_DOCUMENT.rst.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/HOWTO_DOCUMENT.rst.txt b/doc/HOWTO_DOCUMENT.rst.txt
index 530ac7226..61d7c3941 100644
--- a/doc/HOWTO_DOCUMENT.rst.txt
+++ b/doc/HOWTO_DOCUMENT.rst.txt
@@ -29,10 +29,13 @@ The following import conventions are used throughout the NumPy source
and documentation::
import numpy as np
- import scipy as sp
import matplotlib as mpl
import matplotlib.pyplot as plt
+Do not abbreviate ``scipy``. There is no motivating use case to
+abbreviate it in the real world, so we avoid it in the documentation
+to avoid confusion.
+
It is not necessary to do ``import numpy as np`` at the beginning of
an example. However, some sub-modules, such as ``fft``, are not
imported by default, and you have to include them explicitly::
@@ -369,9 +372,9 @@ The sections of the docstring are:
examples work, not for making the examples part of the testing framework.
The examples may assume that ``import numpy as np`` is executed before
- the example code in *numpy*, and ``import scipy as sp`` in *scipy*.
- Additional examples may make use of *matplotlib* for plotting, but should
- import it explicitly, e.g., ``import matplotlib.pyplot as plt``.
+ the example code in *numpy*. Additional examples may make use of
+ *matplotlib* for plotting, but should import it explicitly, e.g.,
+ ``import matplotlib.pyplot as plt``.
Documenting classes