-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Description
#6660, #665, and #6418 added support for pathlib.Path in numpy.load.
However, if mmap_mode is not None in numpy.load, I get an error:
File ".../python3.6/site-packages/numpy/lib/format.py", line 747, in open_memmap
raise ValueError("Filename must be a string. Memmap cannot use"
ValueError: Filename must be a string. Memmap cannot use existing file handles.
The problem is that format.open_memmap does not yet support pathlib.Path.
https://github.com/numpy/numpy/blob/master/numpy/lib/format.py#L703
https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L430
Please let me know whether you would accept a PR for this.
Metadata
Metadata
Assignees
Labels
No labels