File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
from __future__ import absolute_import , print_function , division
3
-
4
- import bz2
5
3
import zlib
4
+ import bz2
5
+
6
6
7
7
import numpy as np
8
8
9
- from . compat import text_type
10
- from . util import ensure_bytes
9
+
10
+ from zarr . compat import text_type
11
11
12
12
13
13
registry = dict ()
@@ -122,7 +122,7 @@ def normalize_opts(cls, compression_opts):
122
122
cname = cname if cname is not None else cls .default_cname
123
123
124
124
# check internal compressor is available
125
- if blosc .compname_to_compcode (ensure_bytes ( cname ) ) < 0 :
125
+ if blosc .compname_to_compcode (cname ) < 0 :
126
126
raise ValueError ('blosc internal compressor not available: %s'
127
127
% cname )
128
128
Original file line number Diff line number Diff line change @@ -187,10 +187,3 @@ def normalize_order(order):
187
187
if order not in ['C' , 'F' ]:
188
188
raise ValueError ("order must be either 'C' or 'F', found: %r" % order )
189
189
return order
190
-
191
-
192
- def ensure_bytes (s ):
193
- if hasattr (s , 'encode' ):
194
- return s .encode ()
195
- else :
196
- return s
You can’t perform that action at this time.
0 commit comments