Skip to content

Commit 4a75a84

Browse files
committed
Fix API change of h5py version 3.0
'.value' was removed in favour of '[()]'
1 parent e618198 commit 4a75a84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

neo/io/hdf5io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _read_epocharray(self, node, parent):
213213
attributes = self._get_standard_attributes(node)
214214
times = self._get_quantity(node["times"])
215215
durations = self._get_quantity(node["durations"])
216-
labels = node["labels"].value.astype('U')
216+
labels = node["labels"][()].astype('U')
217217
epoch = Epoch(times=times, durations=durations, labels=labels, **attributes)
218218
epoch.segment = parent
219219
return epoch
@@ -224,7 +224,7 @@ def _read_epoch(self, node, parent):
224224
def _read_eventarray(self, node, parent):
225225
attributes = self._get_standard_attributes(node)
226226
times = self._get_quantity(node["times"])
227-
labels = node["labels"].value.astype('U')
227+
labels = node["labels"][()].astype('U')
228228
event = Event(times=times, labels=labels, **attributes)
229229
event.segment = parent
230230
return event
@@ -235,8 +235,8 @@ def _read_event(self, node, parent):
235235
def _read_recordingchannelgroup(self, node, parent):
236236
# todo: handle Units
237237
attributes = self._get_standard_attributes(node)
238-
channel_indexes = node["channel_indexes"].value
239-
channel_names = node["channel_names"].value
238+
channel_indexes = node["channel_indexes"][()]
239+
channel_names = node["channel_names"][()]
240240

241241
if channel_indexes.size:
242242
if len(node['recordingchannels']):

0 commit comments

Comments
 (0)