From 110ac37dc4fa0826a89af3eeb9c3f032e71a5480 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Thu, 22 Jan 2015 11:57:49 +1100 Subject: [PATCH] Add doctest skip directives to timing calls --- doc/source/user_guide/numpy_images.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/source/user_guide/numpy_images.txt b/doc/source/user_guide/numpy_images.txt index 6a324d90..1d8f9ae0 100644 --- a/doc/source/user_guide/numpy_images.txt +++ b/doc/source/user_guide/numpy_images.txt @@ -151,7 +151,8 @@ the third imaging dimension has lower resolution than the other two, and processing must be done frame-wise. When frames are the leading dimension, we can use the following syntax: - >>> for image in image3d: # iterate over first dimension + >>> for image in image3d: # doctest: +SKIP + ... # iterate over the leading dimension (frames) ... do_something_to(image) @@ -177,15 +178,15 @@ in a different order, even if the number of operations is the same: >>> import time >>> im3d = np.random.rand(100, 1024, 1024) >>> t0 = time.time(); x = in_order_multiply(im3d, 5); t1 = time.time() - >>> print("%.2f seconds" % (t1 - t0)) + >>> print("%.2f seconds" % (t1 - t0)) # doctest: +SKIP 0.14 seconds >>> im3d_t = np.transpose(im3d).copy() # place "frames" dimension at end >>> im3d_t.shape (1024, 1024, 100) >>> s0 = time.time(); x = out_of_order_multiply(im3d, 5); s1 = time.time() - >>> print("%.2f seconds" % (s1 - s0)) + >>> print("%.2f seconds" % (s1 - s0)) doctest: +SKIP 1.18 seconds - >>> print("Speedup: %.1fx" % ((s1 - s0) / (t1 - t0))) + >>> print("Speedup: %.1fx" % ((s1 - s0) / (t1 - t0))) doctest: +SKIP Speedup: 8.6x