mirror of https://github.com/explosion/spaCy.git
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:
parent
010a7309ff
commit
6ceadcdb5c
|
@ -494,7 +494,7 @@ def from_disk(path, readers, exclude):
|
||||||
path = ensure_path(path)
|
path = ensure_path(path)
|
||||||
for key, reader in readers.items():
|
for key, reader in readers.items():
|
||||||
if key not in exclude:
|
if key not in exclude:
|
||||||
reader(path / key)
|
reader(path2str(path / key))
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue