# Path: hftools/py3compat.py
# PY3 = True
# 
# Path: hftools/dataset/dim.py
# class DimSweep(DiagAxis):
#     pass
# 
# class DimRep(DiagAxis):
#     sortprio = 1
# 
# class DimMatrix_i(_DimMatrix):
#     _indep_axis = DimMatrix_Indep_i
#     _deriv_axis = DimMatrix_Deriv_i
#     sortprio = 1000
# 
# class DimMatrix_j(_DimMatrix):
#     _indep_axis = DimMatrix_Indep_j
#     _deriv_axis = DimMatrix_Deriv_j
#     sortprio = 1001
# 
# Path: hftools/dataset/arrayobj.py
# class hfarray(_hfarray):
#     def __new__(subtype, data, dims=None, dtype=None, copy=True, order=None,
#                 subok=False, ndmin=0, unit=None, outputformat=None, info=None):
#         if hasattr(data, "__hfarray__"):
#             data, dims = data.__hfarray__()
#             if unit is None and len(dims) == 1:
#                 unit = dims[0].unit
#             if outputformat is None and len(dims) == 1:
#                 outputformat = dims[0].outputformat
#         return _hfarray.__new__(subtype, data, dims=dims, dtype=dtype,
#                                 copy=copy, order=order, subok=subok,
#                                 ndmin=ndmin, unit=unit,
#                                 outputformat=outputformat, info=info)
# 
# Path: hftools/utils.py
# def reset_hftools_warnings():
# def timestamp(highres=False):
# def warn(msg):
# def deprecate(msg):
#     def isnumber(x):
#     def isrealnumber(x):
#     def isnumber(x):
#     def isrealnumber(x):
# def is_numlike(a):
# def is_integer(a):
# def to_numeric(value, error=True):
# def stable_uniq(data):
# def uniq(data):
# def chop(x, rtol=1e-9, atol=1e-15):
# def make_dirs(*pathsegments):
# def split_num(string):
# def lex_order(lista):
# def glob(pat):
#     def beep(freq=None, duration=50):
#     def beep(freq=None, duration=50):
# def flatten(lista):


import doctest
import random
import warnings
import unittest
import numpy as np
from hftools.py3compat import PY3
from unittest import skip, expectedFailure
from numpy.random import randint, normal
from hftools.dataset import hfarray, DimSweep, DimRep, DimMatrix_i,\
    DimMatrix_j
from hftools.utils import HFToolsWarning, HFToolsDeprecationWarning
            self.fail(self._formatMessage(msg, standardMsg))

    def assertHFToolsWarning(self, funk, *k, **kw):
        warnings.resetwarnings()
        warnings.simplefilter("error", HFToolsWarning)
        self.assertRaises(HFToolsWarning, funk, *k, **kw)
        warnings.simplefilter("ignore", HFToolsWarning)

    def assertHFToolsDeprecationWarning(self, funk, *k, **kw):
        warnings.resetwarnings()
        warnings.simplefilter("error", HFToolsDeprecationWarning)
        self.assertRaises(HFToolsDeprecationWarning, funk, *k, **kw)
        warnings.simplefilter("ignore", HFToolsDeprecationWarning)

_IDX = 1


def get_label():
    global _IDX
    label = "x_%s_" % _IDX
    _IDX += 1
    return label


def make_load_tests(module):
    """Add doctests to tests for module

    usage::
        load_tests = make_load_tests(module)
    """

# Path: hftools/py3compat.py
# PY3 = True
# 
# Path: hftools/dataset/dim.py
# class DimSweep(DiagAxis):
#     pass
# 
# class DimRep(DiagAxis):
#     sortprio = 1
# 
# class DimMatrix_i(_DimMatrix):
#     _indep_axis = DimMatrix_Indep_i
#     _deriv_axis = DimMatrix_Deriv_i
#     sortprio = 1000
# 
# class DimMatrix_j(_DimMatrix):
#     _indep_axis = DimMatrix_Indep_j
#     _deriv_axis = DimMatrix_Deriv_j
#     sortprio = 1001
# 
# Path: hftools/dataset/arrayobj.py
# class hfarray(_hfarray):
#     def __new__(subtype, data, dims=None, dtype=None, copy=True, order=None,
#                 subok=False, ndmin=0, unit=None, outputformat=None, info=None):
#         if hasattr(data, "__hfarray__"):
#             data, dims = data.__hfarray__()
#             if unit is None and len(dims) == 1:
#                 unit = dims[0].unit
#             if outputformat is None and len(dims) == 1:
#                 outputformat = dims[0].outputformat
#         return _hfarray.__new__(subtype, data, dims=dims, dtype=dtype,
#                                 copy=copy, order=order, subok=subok,
#                                 ndmin=ndmin, unit=unit,
#                                 outputformat=outputformat, info=info)
# 
# Path: hftools/utils.py
# def reset_hftools_warnings():
# def timestamp(highres=False):
# def warn(msg):
# def deprecate(msg):
#     def isnumber(x):
#     def isrealnumber(x):
#     def isnumber(x):
#     def isrealnumber(x):
# def is_numlike(a):
# def is_integer(a):
# def to_numeric(value, error=True):
# def stable_uniq(data):
# def uniq(data):
# def chop(x, rtol=1e-9, atol=1e-15):
# def make_dirs(*pathsegments):
# def split_num(string):
# def lex_order(lista):
# def glob(pat):
#     def beep(freq=None, duration=50):
#     def beep(freq=None, duration=50):
# def flatten(lista):


# Path: hftools/testing/common.py
import doctest
import random
import warnings
import unittest
import numpy as np
from hftools.py3compat import PY3
from unittest import skip, expectedFailure
from numpy.random import randint, normal
from hftools.dataset import hfarray, DimSweep, DimRep, DimMatrix_i,\
    DimMatrix_j
from hftools.utils import HFToolsWarning, HFToolsDeprecationWarning

            self.fail(self._formatMessage(msg, standardMsg))

    def assertHFToolsWarning(self, funk, *k, **kw):
        warnings.resetwarnings()
        warnings.simplefilter("error", HFToolsWarning)
        self.assertRaises(HFToolsWarning, funk, *k, **kw)
        warnings.simplefilter("ignore", HFToolsWarning)

    def assertHFToolsDeprecationWarning(self, funk, *k, **kw):
        warnings.resetwarnings()
        warnings.simplefilter("error", HFToolsDeprecationWarning)
        self.assertRaises(HFToolsDeprecationWarning, funk, *k, **kw)
        warnings.simplefilter("ignore", HFToolsDeprecationWarning)

_IDX = 1


def get_label():
    global _IDX
    label = "x_%s_" % _IDX
    _IDX += 1
    return label


def make_load_tests(module):
    """Add doctests to tests for module

    usage::
        load_tests = make_load_tests(module)
    """

    warnings.simplefilter("error", HFToolsWarning)