# Path: tensorboardX/x2num.py
# def check_nan(array):
# def make_np(x):
# def prepare_pytorch(x):
# def prepare_theano(x):
# def prepare_caffe2(x):
# def prepare_mxnet(x):
# def prepare_chainer(x):


import numpy as np
import unittest
from tensorboardX import x2num
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals




class NumpyTest(unittest.TestCase):
    def test_scalar(self):
        res = x2num.make_np(1.1)
        assert isinstance(res, np.ndarray) and res.shape == (1,)
        res = x2num.make_np(1 << 64 - 1)  # uint64_max
        assert isinstance(res, np.ndarray) and res.shape == (1,)
        res = x2num.make_np(np.float16(1.00000087))
        assert isinstance(res, np.ndarray) and res.shape == (1,)

# Path: tensorboardX/x2num.py
# def check_nan(array):
# def make_np(x):
# def prepare_pytorch(x):
# def prepare_theano(x):
# def prepare_caffe2(x):
# def prepare_mxnet(x):
# def prepare_chainer(x):


# Path: tests/test_numpy.py
import numpy as np
import unittest
from tensorboardX import x2num

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals




class NumpyTest(unittest.TestCase):
    def test_scalar(self):
        res = x2num.make_np(1.1)
        assert isinstance(res, np.ndarray) and res.shape == (1,)
        res = x2num.make_np(1 << 64 - 1)  # uint64_max
        assert isinstance(res, np.ndarray) and res.shape == (1,)
        res = x2num.make_np(np.float16(1.00000087))
        assert isinstance(res, np.ndarray) and res.shape == (1,)

        res = x2num.make_np(np.float128(1.00008 + 9))