Skip to content

Commit 589772a

Browse files
committed
numpy needed for unpack_array, but deferr input to the latest point possible
1 parent 6f74d0f commit 589772a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blosc/toplevel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,8 @@ def unpack_array(packed_array, **kwargs):
785785
if kwargs and PY3X:
786786
array = pickle.loads(pickled_array, **kwargs)
787787
if all(isinstance(x, bytes) for x in array.tolist()):
788-
import numpy
789-
array = numpy.array([x.decode('utf-8') for x in array.tolist()])
788+
import numpy as np
789+
array = np.array([x.decode('utf-8') for x in array.tolist()])
790790
else:
791791
array = pickle.loads(pickled_array)
792792

0 commit comments

Comments
 (0)