initial commit

This commit is contained in:
klein panic
2024-09-29 01:45:51 -04:00
commit 34102c9fb5
2986 changed files with 634375 additions and 0 deletions

View 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')