Skip to content

Commit 833d3bf

Browse files
committed
ChannelIndex.channel_names is now 'U' instead of 'S'
1 parent 360c17c commit 833d3bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

neo/core/channelindex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class ChannelIndex(Container):
152152
_data_child_objects = ('AnalogSignal', 'IrregularlySampledSignal')
153153
_single_parent_objects = ('Block',)
154154
_necessary_attrs = (('index', np.ndarray, 1, np.dtype('i')),)
155-
_recommended_attrs = ((('channel_names', np.ndarray, 1, np.dtype('S')),
155+
_recommended_attrs = ((('channel_names', np.ndarray, 1, np.dtype('U')),
156156
('channel_ids', np.ndarray, 1, np.dtype('i')),
157157
('coordinates', pq.Quantity, 2)) +
158158
Container._recommended_attrs)
@@ -173,7 +173,7 @@ def __init__(self, index, channel_names=None, channel_ids=None,
173173

174174
# Defaults
175175
if channel_names is None:
176-
channel_names = np.array([], dtype='S')
176+
channel_names = np.array([], dtype='U')
177177
if channel_ids is None:
178178
channel_ids = np.array([], dtype='i')
179179

neo/io/basefromrawio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def read_block(self, block_index=0, lazy=False, signal_group_mode=None,
139139
chidx_annotations.pop('name')
140140
chidx_annotations = check_annotations(chidx_annotations)
141141
# this should be done with array_annotation soon:
142-
ch_names = all_channels[ind_abs]['name'].astype('S')
142+
ch_names = all_channels[ind_abs]['name'].astype('U')
143143
neo_channel_index = ChannelIndex(index=ind_within,
144144
channel_names=ch_names,
145145
channel_ids=all_channels[ind_abs]['id'],

0 commit comments

Comments
 (0)