From e4f233ecfedd2aafa258db2d3ae27e30604cc020 Mon Sep 17 00:00:00 2001 From: Paul Ivanov Date: Mon, 28 Dec 2009 20:49:52 +0000 Subject: fixed a whole bunch of doctests --- numpy/doc/structured_arrays.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/doc/structured_arrays.py') diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py index 59af4eb57..21fdf87ea 100644 --- a/numpy/doc/structured_arrays.py +++ b/numpy/doc/structured_arrays.py @@ -105,7 +105,7 @@ dtype definition (using any of the variants being described here). As an example (using a definition using a list, so see 3) for further details): :: - >>> x = zeros(3, dtype=('i4',[('r','u1'), ('g','u1'), ('b','u1'), ('a','u1')])) + >>> x = np.zeros(3, dtype=('i4',[('r','u1'), ('g','u1'), ('b','u1'), ('a','u1')])) >>> x array([0, 0, 0]) >>> x['r'] @@ -145,6 +145,7 @@ The other dictionary form permitted is a dictionary of name keys with tuple values specifying type, offset, and an optional title. >>> x = np.zeros(3, dtype={'col1':('i1',0,'title 1'), 'col2':('f4',1,'title 2')}) + >>> x array([(0, 0.0), (0, 0.0), (0, 0.0)], dtype=[(('title 1', 'col1'), '|i1'), (('title 2', 'col2'), '>f4')]) -- cgit v1.2.1