Updated script that can be controled by Nodejs web app
This commit is contained in:
18
lib/python3.13/site-packages/numpy/_utils/_convertions.py
Normal file
18
lib/python3.13/site-packages/numpy/_utils/_convertions.py
Normal file
@ -0,0 +1,18 @@
|
||||
"""
|
||||
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')
|
Reference in New Issue
Block a user