Hi pynapple devs. When calling pynapple.load_file with pathlib.Path (as opposed to a string), pynapple raises an AttributeError because it tries to call path.endswith:
import pynapple as nap
import pathlib
p = pathlib.Path('test_file.npz')
nap.load_files(p)
(This came up for me because of some code I'm writing for nemos to download data in our examples, using pooch)
An easy fix would be to just call path.as_posix() to convert pathlib.Path objects to string, but using the Path objects directly under the hood will probably make many things easier.
Hi pynapple devs. When calling
pynapple.load_file
with pathlib.Path (as opposed to a string), pynapple raises anAttributeError
because it tries to callpath.endswith
:(This came up for me because of some code I'm writing for nemos to download data in our examples, using pooch)
An easy fix would be to just call
path.as_posix()
to convert pathlib.Path objects to string, but using the Path objects directly under the hood will probably make many things easier.