def convert_dtypes(dtype_template, order_code):
 dtypes = dtype_template.copy()
 for k in dtypes:
  dtypes[k] = np.dtype(dtypes[k]).newbyteorder(order_code)
 return dtypes

def convert_dtypes ( dtype_template , order_code ) : dtypes = dtype_template . copy ( ) for k in dtypes : dtypes [ k ] = np . dtype ( dtypes [ k ] ) . newbyteorder ( order_code ) return dtypes
convert dtypes in mapping to given order parameters dtype_template : mapping mapping with values returning numpy dtype from np .