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/basics.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/doc/basics.py') diff --git a/numpy/doc/basics.py b/numpy/doc/basics.py index d34c1f303..5e7291957 100644 --- a/numpy/doc/basics.py +++ b/numpy/doc/basics.py @@ -67,6 +67,7 @@ functions or methods accept. Some examples:: >>> y array([1, 2, 4]) >>> z = np.arange(3, dtype=np.uint8) + >>> z array([0, 1, 2], dtype=uint8) Array types can also be referred to by character codes, mostly to retain @@ -81,8 +82,8 @@ We recommend using dtype objects instead. To convert the type of an array, use the .astype() method (preferred) or the type itself as a function. For example: :: - >>> z.astype(float) - array([0., 1., 2.]) + >>> z.astype(float) #doctest: +NORMALIZE_WHITESPACE + array([ 0., 1., 2.]) >>> np.int8(z) array([0, 1, 2], dtype=int8) -- cgit v1.2.1