diff options
author | Paul Ivanov <paul.ivanov@local> | 2009-12-28 20:49:52 +0000 |
---|---|---|
committer | Paul Ivanov <paul.ivanov@local> | 2009-12-28 20:49:52 +0000 |
commit | e4f233ecfedd2aafa258db2d3ae27e30604cc020 (patch) | |
tree | 6d32fbdd19b8dca00cd7cafd8df076bac55ddfd8 /numpy/doc/basics.py | |
parent | 5ba01996a9ab2fdfb7c120a5afae801f854a781a (diff) | |
download | numpy-e4f233ecfedd2aafa258db2d3ae27e30604cc020.tar.gz |
fixed a whole bunch of doctests
Diffstat (limited to 'numpy/doc/basics.py')
-rw-r--r-- | numpy/doc/basics.py | 5 |
1 files changed, 3 insertions, 2 deletions
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) |