def to_numpy_code(code):
 code = code.lower()
 if (code is None):
  return native_code
 if (code in aliases['little']):
  return '<'
 elif (code in aliases['big']):
  return '>'
 elif (code in aliases['native']):
  return native_code
 elif (code in aliases['swapped']):
  return swapped_code
 else:
  raise ValueError(('We cannot handle byte order %s' % code))

def to_numpy_code ( code ) : code = code . lower ( ) if ( code is None ) : return native_code if ( code in aliases [ 'little' ] ) : return '<' elif ( code in aliases [ 'big' ] ) : return '>' elif ( code in aliases [ 'native' ] ) : return native_code elif ( code in aliases [ 'swapped' ] ) : return swapped_code else : raise ValueError ( ( 'We cannot handle byte order %s' % code ) )
convert various order codings to numpy format .