D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
3
/
cwd
/
opt
/
imh-python
/
lib
/
python3.9
/
site-packages
/
numpy
/
_utils
/
Filename :
_convertions.py
back
Copy
""" A set of methods retained from np.compat module that are still used across codebase. """ __all__ = ["asunicode", "asbytes"] def asunicode(s): if isinstance(s, bytes): return s.decode('latin1') return str(s) def asbytes(s): if isinstance(s, bytes): return s return str(s).encode('latin1')