From fef4b0970bc353c4eaa37056d72dba039e334ea3 Mon Sep 17 00:00:00 2001 From: Rupert Thompson Date: Sat, 29 Nov 2014 16:55:33 +0000 Subject: [PATCH] BUG: fix doctests in pandas.core.common $ nosetests pandas/core/common.py --with-doc -v --- pandas/core/common.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandas/core/common.py b/pandas/core/common.py index 759f5f1dfaf7a..6aff67412d677 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -404,9 +404,13 @@ def array_equivalent(left, right, strict_nan=False): Examples -------- - >>> array_equivalent(np.array([1, 2, nan]), np.array([1, 2, nan])) + >>> array_equivalent( + ... np.array([1, 2, np.nan]), + ... np.array([1, 2, np.nan])) True - >>> array_equivalent(np.array([1, nan, 2]), np.array([1, 2, nan])) + >>> array_equivalent( + ... np.array([1, np.nan, 2]), + ... np.array([1, 2, np.nan])) False """ @@ -2171,8 +2175,8 @@ def iterpairs(seq): Examples -------- - >>> iterpairs([1, 2, 3, 4]) - [(1, 2), (2, 3), (3, 4) + >>> list(iterpairs([1, 2, 3, 4])) + [(1, 2), (2, 3), (3, 4)] """ # input may not be sliceable seq_it = iter(seq)