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.
This commit is contained in:
Jostein Bø Fløystad
2013-07-12 12:51:04 +02:00
parent 8927147e2c
commit 09cfe0b929
+6 -6
View File
@@ -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,