@staticmethod
def type2str(t):
    """
        Converts a type into a string.
        """
    s = str(t)
    if 'numpy' in s:
        s = t.__name__
    elif '<class' in s:
        if t == int:
            s = 'int64'
        elif t == str:
            s = 'str'
        elif s == 'float':
            s = 'R8'
        else:
            raise ValueError('Unable to convery type {0} into a string'.
                format(t))
    return s
