Skip to content

Commit eceddca

Browse files
committed
Remove [()] when accessing HDF5 datasets
1 parent 3e11d1c commit eceddca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/open_ephys/analysis/formats/NwbRecording.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def __init__(self, nwb, dataset):
7575
nwb["acquisition"][dataset]["channel_conversion"][()] * 1e6
7676
)
7777

78-
self.samples = nwb["acquisition"][dataset]["data"][()]
79-
self.sample_numbers = nwb["acquisition"][dataset]["sync"][()]
80-
self.timestamps = nwb["acquisition"][dataset]["timestamps"][()]
81-
78+
self.samples = nwb["acquisition"][dataset]["data"]
79+
self.sample_numbers = nwb["acquisition"][dataset]["sync"]
80+
self.timestamps = nwb["acquisition"][dataset]["timestamps"]
81+
8282
self.global_timestamps = None
8383

8484
def get_samples(
@@ -195,9 +195,9 @@ def load_events(self):
195195
stream_id += 1
196196

197197
ds = self.nwb["acquisition"][dataset]
198-
channel_states = ds["data"][()]
199-
sample_numbers = ds["sync"][()]
200-
timestamps = ds["timestamps"][()]
198+
channel_states = ds["data"]
199+
sample_numbers = ds["sync"]
200+
timestamps = ds["timestamps"]
201201

202202
events.append(
203203
pd.DataFrame(

0 commit comments

Comments
 (0)