Make sure from_disk passes string to numpy (see #1421)

If path is a WindowsPath, numpy does not recognise it as a path and as
a result, doesn't open the file.
https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L369
This commit is contained in:
ines 2017-10-16 18:29:56 +02:00
parent 010a7309ff
commit 6ceadcdb5c

View File

@ -494,7 +494,7 @@ def from_disk(path, readers, exclude):
path = ensure_path(path)
for key, reader in readers.items():
if key not in exclude:
reader(path / key)
reader(path2str(path / key))
return path