Skip to content

Commit aa3d561

Browse files
authored
Merge pull request #3751 from h-mayorquin/fix_numpy_2.0_representation
Fix stream names and ids representation in numpy 2.0
2 parents f2dd329 + 44d42e9 commit aa3d561

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/spikeinterface/extractors/neoextractors/neobaseextractor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def get_streams(cls, *args, **kwargs):
7373
neo_reader = cls.get_neo_io_reader(cls.NeoRawIOClass, **neo_kwargs)
7474

7575
stream_channels = neo_reader.header["signal_streams"]
76-
stream_names = list(stream_channels["name"])
77-
stream_ids = list(stream_channels["id"])
76+
stream_names = stream_channels["name"].tolist()
77+
stream_ids = stream_channels["id"].tolist()
7878
return stream_names, stream_ids
7979

8080
def build_stream_id_to_sampling_frequency_dict(self) -> Dict[str, float]:
@@ -200,13 +200,13 @@ def __init__(
200200
use_names_as_ids = False
201201

202202
stream_channels = self.neo_reader.header["signal_streams"]
203-
stream_names = list(stream_channels["name"])
204-
stream_ids = list(stream_channels["id"])
203+
stream_names = stream_channels["name"].tolist()
204+
stream_ids = stream_channels["id"].tolist()
205205

206206
if stream_id is None and stream_name is None:
207207
if stream_channels.size > 1:
208208
raise ValueError(
209-
f"This reader have several streams: \nNames: {stream_names}\nIDs: {stream_ids}. \n"
209+
f"This reader have several streams: \n`stream_names`: {stream_names}\n`stream_ids`: {stream_ids}. \n"
210210
f"Specify it from the options above with the 'stream_name' or 'stream_id' arguments"
211211
)
212212
else:

0 commit comments

Comments
 (0)