Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ asunicode
Function
asunicode
numpy/compat/py3k.py:34–37 ·
view source on GitHub ↗
(s)
Source
from the content-addressed store, hash-verified
32
bytes = bytes
33
34
def
asunicode(s):
35
if
isinstance(s, bytes):
36
return
s.decode(
'latin1'
)
37
return
str(s)
38
39
def
asbytes(s):
40
if
isinstance(s, bytes):
Callers
2
write_normal
Method · 0.90
asunicode_nested
Function · 0.70
Calls
1
decode
Method · 0.80
Tested by
no test coverage detected