import unittest

import numpy as np

from chainer import testing

from chainercv.visualizations import vis_image

try:
    import matplotlib  # NOQA
    optional_modules = True
except ImportError:
    optional_modules = False


@testing.parameterize(
    {'img': np.random.randint(0, 255, size=(3, 32, 32)).astype(np.float32)},
    {'img': None}
)
class TestVisImage(unittest.TestCase):

    def test_vis_image(self):
        if optional_modules:
            ax = vis_image(self.img)

            self.assertTrue(isinstance(ax, matplotlib.axes.Axes))


testing.run_module(__name__, __file__)

5f1a4c3a03b2ef9ec08bc5af78667b8ffc79daab
<mask token>


@testing.parameterize({'img': np.random.randint(0, 255, size=(3, 32, 32)).
    astype(np.float32)}, {'img': None})
class TestVisImage(unittest.TestCase):
    <mask token>


<mask token>

<mask token>


@testing.parameterize({'img': np.random.randint(0, 255, size=(3, 32, 32)).
    astype(np.float32)}, {'img': None})
class TestVisImage(unittest.TestCase):

    def test_vis_image(self):
        if optional_modules:
            ax = vis_image(self.img)
            self.assertTrue(isinstance(ax, matplotlib.axes.Axes))


<mask token>

<mask token>
try:
    import matplotlib
    optional_modules = True
except ImportError:
    optional_modules = False


@testing.parameterize({'img': np.random.randint(0, 255, size=(3, 32, 32)).
    astype(np.float32)}, {'img': None})
class TestVisImage(unittest.TestCase):

    def test_vis_image(self):
        if optional_modules:
            ax = vis_image(self.img)
            self.assertTrue(isinstance(ax, matplotlib.axes.Axes))


testing.run_module(__name__, __file__)

import unittest
import numpy as np
from chainer import testing
from chainercv.visualizations import vis_image
try:
    import matplotlib
    optional_modules = True
except ImportError:
    optional_modules = False


@testing.parameterize({'img': np.random.randint(0, 255, size=(3, 32, 32)).
    astype(np.float32)}, {'img': None})
class TestVisImage(unittest.TestCase):

    def test_vis_image(self):
        if optional_modules:
            ax = vis_image(self.img)
            self.assertTrue(isinstance(ax, matplotlib.axes.Axes))


testing.run_module(__name__, __file__)

import unittest

import numpy as np

from chainer import testing

from chainercv.visualizations import vis_image

try:
    import matplotlib  # NOQA
    optional_modules = True
except ImportError:
    optional_modules = False


@testing.parameterize(
    {'img': np.random.randint(0, 255, size=(3, 32, 32)).astype(np.float32)},
    {'img': None}
)
class TestVisImage(unittest.TestCase):

    def test_vis_image(self):
        if optional_modules:
            ax = vis_image(self.img)

            self.assertTrue(isinstance(ax, matplotlib.axes.Axes))


testing.run_module(__name__, __file__)
