
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/future/plot_future_imports.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_auto_examples_future_plot_future_imports.py>`
        to download the full example code or to run this example in your browser via Binder

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_future_plot_future_imports.py:


Test __future__ imports across cells
------------------------------------

This example tests that __future__ imports works across cells.

.. GENERATED FROM PYTHON SOURCE LINES 7-12

.. code-block:: python3


    from __future__ import division
    from __future__ import print_function
    import matplotlib








.. GENERATED FROM PYTHON SOURCE LINES 13-14

Dummy section, with :func:`sphinx_gallery.backreferences.NameFinder` ref.

.. GENERATED FROM PYTHON SOURCE LINES 14-23

.. code-block:: python3


    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.




.. rst-class:: sphx-glr-script-out

 Out:

 .. code-block:: none

    1.5




.. rst-class:: sphx-glr-timing

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


.. _sphx_glr_download_auto_examples_future_plot_future_imports.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example


  .. container:: binder-badge

    .. image:: images/binder_badge_logo.svg
      :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/future/plot_future_imports.ipynb
      :alt: Launch binder
      :width: 150 px


  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_future_imports.py <plot_future_imports.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_future_imports.ipynb <plot_future_imports.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
