from __future__ import absolute_import
pyversion = float(_sys.version_info[0]) + float(_sys.version_info[1]) / 10
numpy_string_coding = "S"
if isinstance(bs,bytearray):
numpy_string_coding = "U"
return [ val if isinstance(val,bytearray) else bytes(str(val),_sys.getdefaultencoding()) for val in s ]
return s if isinstance(s,bytearray) else bytes(str(s),_sys.getdefaultencoding())
return [ val.decode(_sys.getdefaultencoding( ),"strict") if isinstance(val,bytearray) or isinstance(val,bytes) else val for val in bs ]
return bs.decode(_sys.getdefaultencoding( ),"strict") if isinstance(bs,bytearray) or isinstance(bs,bytes) else bs
if isinstance(bs,bytearray):
if isinstance(bs,bytearray):
return bs.decode(enc,"strict")
"string": lambda x: str_encode(str(x)),
"bool": lambda x: bool(x),
"float": lambda x: float(x),
"double": lambda x: float(x),
"floatArray": lambda x: [float(y) for y in x],
"doubleArray": lambda x: [float(y) for y in x],
"intArray": lambda x: [int(y) for y in x],
"boolArray": lambda x: [bool(y) for y in x],
"byteArray": lambda x: bytearray(x),
"bytearray": lambda x: bytearray(x),
"record": lambda x: dict(x),
"dict": lambda x: dict(x),