summaryrefslogtreecommitdiff
path: root/numpy/doc/glossary.py
diff options
context:
space:
mode:
authorPaul Ivanov <paul.ivanov@local>2009-12-28 20:49:52 +0000
committerPaul Ivanov <paul.ivanov@local>2009-12-28 20:49:52 +0000
commite4f233ecfedd2aafa258db2d3ae27e30604cc020 (patch)
tree6d32fbdd19b8dca00cd7cafd8df076bac55ddfd8 /numpy/doc/glossary.py
parent5ba01996a9ab2fdfb7c120a5afae801f854a781a (diff)
downloadnumpy-e4f233ecfedd2aafa258db2d3ae27e30604cc020.tar.gz
fixed a whole bunch of doctests
Diffstat (limited to 'numpy/doc/glossary.py')
-rw-r--r--numpy/doc/glossary.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/numpy/doc/glossary.py b/numpy/doc/glossary.py
index f591a5424..dc7c75a0a 100644
--- a/numpy/doc/glossary.py
+++ b/numpy/doc/glossary.py
@@ -181,7 +181,7 @@ iterable
[1, 4, 9]
It is often used in combintion with ``enumerate``::
-
+ >>> keys = ['a','b','c']
>>> for n, k in enumerate(keys):
... print "Key %d: %s" % (n, k)
...
@@ -242,13 +242,16 @@ masked array
>>> x = np.ma.masked_array([np.nan, 2, np.nan], [True, False, True])
>>> x
masked_array(data = [-- 2.0 --],
- mask = [ True False True],
- fill_value=1e+20)
+ mask = [ True False True],
+ fill_value = 1e+20)
+ <BLANKLINE>
>>> x + [1, 2, 3]
masked_array(data = [-- 4.0 --],
- mask = [ True False True],
- fill_value=1e+20)
+ mask = [ True False True],
+ fill_value = 1e+20)
+ <BLANKLINE>
+
Masked arrays are often used when operating on arrays containing
missing or invalid entries.
@@ -366,7 +369,7 @@ tuple
This is often used when a function returns multiple values:
>>> def return_many():
- ... return 1, 'alpha'
+ ... return 1, 'alpha', None
>>> a, b, c = return_many()
>>> a, b, c