Skip to content

Commit

Permalink
Fixed reading of numpy arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
markgw committed Aug 5, 2019
1 parent 9a4d98f commit b97992f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python/pimlico/datatypes/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pimlico.core.dependencies.python import numpy_dependency, scipy_dependency
from pimlico.datatypes.files import NamedFileCollection
from pimlico.utils.core import cached_property
from io import open

__all__ = ["NumpyArray", "ScipySparseMatrix"]

Expand All @@ -35,7 +36,7 @@ class Reader(object):
@cached_property
def array(self):
import numpy
with open(self.get_absolute_path("array.npy"), "r") as f:
with open(self.get_absolute_path("array.npy"), "rb") as f:
return numpy.load(f)

class Writer(object):
Expand Down

0 comments on commit b97992f

Please sign in to comment.