

def convert_dtypes(dtype_template, order_code):
    ' Convert dtypes in mapping to given order\n\n    Parameters\n    ----------\n    dtype_template : mapping\n       mapping with values returning numpy dtype from ``np.dtype(val)``\n    order_code : str\n       an order code suitable for using in ``dtype.newbyteorder()``\n\n    Returns\n    -------\n    dtypes : mapping\n       mapping where values have been replaced by\n       ``np.dtype(val).newbyteorder(order_code)``\n\n    '
    dtypes = dtype_template.copy()
    for k in dtypes:
        dtypes[k] = np.dtype(dtypes[k]).newbyteorder(order_code)
    return dtypes

dataset/ETHPy150Open scipy/scipy/scipy/io/matlab/miobase.py convert_dtypes/original