Test __future__ imports across cellsΒΆ

This example tests that __future__ imports works across cells.

from __future__ import division
from __future__ import print_function
import matplotlib

Dummy section, with sphinx_gallery.backreferences.NameFinder() ref.

assert 3/2 == 1.5
print(3/2, end='')

# testing reset of mpl
orig_dpi = 80. if matplotlib.__version__[0] < '2' else 100.
assert matplotlib.rcParams['figure.dpi'] == orig_dpi
matplotlib.rcParams['figure.dpi'] = 90.
assert matplotlib.rcParams['figure.dpi'] == 90.

Out:

1.5

Total running time of the script: ( 0 minutes 0.001 seconds)

Gallery generated by Sphinx-Gallery