# Path: hftools/utils.py
# def is_numlike(a):
#     if isinstance(a, np.ndarray):
#         return np.issubdtype(a.dtype, np.number)
#     else:
#         return np.issubdtype(np.array(a).dtype, np.number)
# 
# def is_integer(a):
#     if isinstance(a, np.ndarray):
#         return a.dtype.kind == "i"
#     else:
#         return isinstance(a, int)
# 
# def deprecate(msg):
#     warnings.warn(msg, HFToolsDeprecationWarning)
# 
# Path: hftools/py3compat.py
# DEFAULT_ENCODING = "cp1252"
#     PY3 = True
#     PY3 = False
# def no_code(x, encoding=None):
# def decode(s, encoding=None):
# def encode(u, encoding=None):
# def cast_unicode(s, encoding=None):
# def cast_bytes(s, encoding=None):
#     def reraise(tp, value, tb=None):
#     def popen(command):
#     def popen(command):
#     def print(*k, **kw):
# def cast_str(s, encoding=None):


import datetime
import numpy as np
import six
from hftools.utils import is_numlike, is_integer, deprecate
from hftools.py3compat import integer_types
                yield subitem
        else:
            yield item


class DimBase(object):
    sortprio = 0

    def __init__(self, Name, data=None, unit=None, name=None,
                 outputformat=None):
        if isinstance(Name, DimBase):
            dim_data = Name.data
            dim_name = Name.name
            dim_unit = Name.unit
            dim_outputformat = Name.outputformat
        else:
            dim_data = data
            dim_name = Name
            dim_unit = unit
            dim_outputformat = outputformat

        if data is not None:
            dim_data = data
        if unit is not None:
            dim_unit = unit
        if name is not None:
            dim_name = name
        if outputformat is not None:
            dim_outputformat = outputformat


# Path: hftools/utils.py
# def is_numlike(a):
#     if isinstance(a, np.ndarray):
#         return np.issubdtype(a.dtype, np.number)
#     else:
#         return np.issubdtype(np.array(a).dtype, np.number)
# 
# def is_integer(a):
#     if isinstance(a, np.ndarray):
#         return a.dtype.kind == "i"
#     else:
#         return isinstance(a, int)
# 
# def deprecate(msg):
#     warnings.warn(msg, HFToolsDeprecationWarning)
# 
# Path: hftools/py3compat.py
# DEFAULT_ENCODING = "cp1252"
#     PY3 = True
#     PY3 = False
# def no_code(x, encoding=None):
# def decode(s, encoding=None):
# def encode(u, encoding=None):
# def cast_unicode(s, encoding=None):
# def cast_bytes(s, encoding=None):
#     def reraise(tp, value, tb=None):
#     def popen(command):
#     def popen(command):
#     def print(*k, **kw):
# def cast_str(s, encoding=None):


# Path: hftools/dataset/dim.py
import datetime
import numpy as np
import six
from hftools.utils import is_numlike, is_integer, deprecate
from hftools.py3compat import integer_types

                yield subitem
        else:
            yield item


class DimBase(object):
    sortprio = 0

    def __init__(self, Name, data=None, unit=None, name=None,
                 outputformat=None):
        if isinstance(Name, DimBase):
            dim_data = Name.data
            dim_name = Name.name
            dim_unit = Name.unit
            dim_outputformat = Name.outputformat
        else:
            dim_data = data
            dim_name = Name
            dim_unit = unit
            dim_outputformat = outputformat

        if data is not None:
            dim_data = data
        if unit is not None:
            dim_unit = unit
        if name is not None:
            dim_name = name
        if outputformat is not None:
            dim_outputformat = outputformat


        if isinstance(dim_data, integer_types):