We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a64aed9 commit bd1ebe8Copy full SHA for bd1ebe8
1 file changed
src/spikeinterface/core/sortinganalyzer.py
@@ -2092,6 +2092,13 @@ def load_data(self):
2092
import pandas as pd
2093
2094
ext_data = pd.read_csv(ext_data_file, index_col=0)
2095
+ # really sad hack here because csv was a bad choice for saving a DataFrame (maybe a npy per columns would have been better)
2096
+ unit_ids = self.sorting_analyzer.unit_ids
2097
+ if ext_data.shape[0] == unit_ids.size:
2098
+ # we force dtype to be the same as unit_ids
2099
+ if ext_data.index.dtype != unit_ids.dtype:
2100
+ ext_data.index = ext_data.index.astype(unit_ids.dtype)
2101
+
2102
elif ext_data_file.suffix == ".pkl":
2103
with ext_data_file.open("rb") as f:
2104
ext_data = pickle.load(f)
0 commit comments