From 09cfe0b929a0044bea40e1cf68a6bdacd0384dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Fri, 12 Jul 2013 12:51:04 +0200 Subject: [PATCH] examples: Avoid python3-specific syntax. from __future__ import ... is ineffective when the example script is exec-ed by sphinx, resulting in a SyntaxError when running under python2. Fixes gh-649. --- doc/examples/plot_local_binary_pattern.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/examples/plot_local_binary_pattern.py b/doc/examples/plot_local_binary_pattern.py index 6789b238..c0169cc1 100644 --- a/doc/examples/plot_local_binary_pattern.py +++ b/doc/examples/plot_local_binary_pattern.py @@ -194,12 +194,12 @@ refs = { # classify rotated textures print('Rotated images matched against references using LBP:') -print('original: brick, rotated: 30deg, match result: ', end='') -print(match(refs, rotate(brick, angle=30, resize=False))) -print('original: brick, rotated: 70deg, match result: ', end='') -print(match(refs, rotate(brick, angle=70, resize=False))) -print('original: grass, rotated: 145deg, match result: ', end='') -print(match(refs, rotate(grass, angle=145, resize=False))) +print('original: brick, rotated: 30deg, match result: ', + match(refs, rotate(brick, angle=30, resize=False))) +print('original: brick, rotated: 70deg, match result: ', + match(refs, rotate(brick, angle=70, resize=False))) +print('original: grass, rotated: 145deg, match result: ', + match(refs, rotate(grass, angle=145, resize=False))) # plot histograms of LBP of textures fig, ((ax1, ax2, ax3), (ax4, ax5, ax6)) = plt.subplots(nrows=2, ncols=3,