From d44e74df3d31dfcd37eeef11bf5af14189c42433 Mon Sep 17 00:00:00 2001 From: Robert Kern Date: Fri, 1 Apr 2011 17:48:39 -0500 Subject: DOC: Remove the advice to 'import scipy as sp' from the documentation. Correct a statement about how doctest namespaces are initialized in scipy. --- doc/HOWTO_DOCUMENT.rst.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'doc/HOWTO_DOCUMENT.rst.txt') 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 -- cgit v1.2.1