MCPcopy Create free account
hub / github.com/numpy/numpy / asstr

Function asstr

numpy/compat/py3k.py:44–47  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

42 return str(s).encode('latin1')
43
44def asstr(s):
45 if isinstance(s, bytes):
46 return s.decode('latin1')
47 return str(s)
48
49def isfileobj(f):
50 if not isinstance(f, (io.FileIO, io.BufferedReader, io.BufferedWriter)):

Callers 3

savetxtFunction · 0.90
fromregexFunction · 0.90
build_module_distutilsFunction · 0.90

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected