def getnumber(b):
    r"""obtain number in string or bytes

    obtain number in string/bytes, e.g. b' 123 45 ' --> [123, 45],
    b' 123, 45 ' --> [123, 45] and b'  ' --> []

    Parameters
    ----------
    b : bytes
        bytes string for extracting numbers.

    Returns
    -------
    n : number list or number
        extracted number list, if there only one element, return a number.
    """

def splitfmt(fmt):

