Skip to content

Commit cdbd103

Browse files
committed
>> moved decode() function to pandas.py module
>> deleted compat.py module
1 parent c016566 commit cdbd103

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

larray/inout/pandas.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
from larray.core.axis import Axis, AxisCollection
88
from larray.core.constants import nan
99
from larray.util.misc import unique
10-
from larray.util.compat import decode
10+
11+
12+
def decode(s, encoding='utf-8', errors='strict'):
13+
if isinstance(s, bytes):
14+
return s.decode(encoding, errors)
15+
else:
16+
assert s is None or isinstance(s, str), "unexpected " + str(type(s))
17+
return s
1118

1219

1320
def parse(s):

larray/util/compat.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)