Skip to content

Commit

Permalink
* change tutorial to use correct h5py.File object
Browse files Browse the repository at this point in the history
* rmv addition of RemFile as an allowed type for NWBHDF5IO
  • Loading branch information
bendichter committed Nov 27, 2023
1 parent a942988 commit 31c5f5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/gallery/advanced_io/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@
from pynwb import NWBHDF5IO
import remfile

file = remfile.File(s3_url)
rem_file = remfile.File(s3_url)

with h5py.File(file, "r") as f:
with NWBHDF5IO(file=file, load_namespaces=True) as io:
with h5py.File(rem_file, "r") as h5py_file:
with NWBHDF5IO(file=h5py_file, load_namespaces=True) as io:
nwbfile = io.read()
print(nwbfile.acquisition["lick_times"].time_series["lick_left_times"].data[:])

Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def can_read(path: str):
{'name': 'extensions', 'type': (str, TypeMap, list),
'doc': 'a path to a namespace, a TypeMap, or a list consisting paths to namespaces and TypeMaps',
'default': None},
{'name': 'file', 'type': [h5py.File, 'S3File', "RemFile"], 'doc': 'a pre-existing h5py.File object',
{'name': 'file', 'type': [h5py.File, 'S3File'], 'doc': 'a pre-existing h5py.File object',
'default': None},
{'name': 'comm', 'type': "Intracomm", 'doc': 'the MPI communicator to use for parallel I/O',
'default': None},
Expand Down

0 comments on commit 31c5f5f

Please sign in to comment.