From fd426e70de35b2dad135e9a4295b064d59489e5e Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Sun, 15 Oct 2017 23:10:47 +0200 Subject: [PATCH] Fixed doctest --- wafo/kdetools/gridding.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wafo/kdetools/gridding.py b/wafo/kdetools/gridding.py index dec00da..1735172 100644 --- a/wafo/kdetools/gridding.py +++ b/wafo/kdetools/gridding.py @@ -172,9 +172,15 @@ def accum(accmap, a, func=None, shape=None, fill_value=0, dtype=None): [ 7., 9.]]) # Same accmap, but create an array of lists of values. - >>> accum(accmap, a, func=lambda x: x, dtype='O') - array([[[1, 2, 4, -1], [3, 6]], - [[-1, 8], [9]]], dtype=object) + >>> t = accum(accmap, a, func=lambda x: x, dtype='O') + >>> np.allclose(t[0][0], [1, 2, 4, -1]) + True + >>> np.allclose(t[0][1], [3, 6]) + True + >>> np.allclose(t[1][0], [-1, 8]) + True + >>> np.allclose(t[1][1], [9]) + True """