[SciPy-dev] ANN: NumPy/SciPy Documentation Marathon 2008
Stéfan van der Walt
Mon May 19 06:30:00 CDT 2008
2008/5/18 Johann Cohen-Tanugi <firstname.lastname@example.org>:
> well, there is a little bit of magic that I do not understand. If I do
> not put an 'import numpy' at the very first Example section of the
> fromnumeric.py file (id est in the doctest of the choose function), I
> get plenty of errors stating that numpy is not known, irrespective of
> whether I call
> ipython -c "import doctest,
> ipython -c "import
> On the other hand, if I put 'import numpy' in the doctest of the choose
> function, it seems to become valid for the rest of the doctests,
> irrespective of whether I execute the first or second line above.
Your observation is correct. We shall probably inject 'numpy'
artificially into the doctest namespace before running them. Doctest
picks up both imports made in the file itself and in doctest sections.
Stéfan (Johann) van der Walt :)
More information about the Scipy-dev