Skip to content

Commit e3a23f4

Browse files
committed
fix test overflow error
1 parent a629039 commit e3a23f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

wfdb/io/annotation.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,12 @@ def create_label_map(self, inplace=True):
908908
if self.custom_labels is not None:
909909
self.standardize_custom_labels()
910910
for i in self.custom_labels.index:
911-
label_map.loc[i] = self.custom_labels.loc[i]
911+
# label_map.loc[i] = self.custom_labels.loc[i]
912+
label_map['label_store'] = label_map['label_store'].astype('int64')
913+
cl = self.custom_labels.astype({'label_store': 'int64'}).set_index('label_store')
914+
lm = label_map.set_index('label_store').reindex(label_map['label_store'].unique())
915+
lm.update(cl[['symbol', 'description']])
916+
label_map = lm.reset_index()
912917

913918
if inplace:
914919
self.__label_map__ = label_map

0 commit comments

Comments
 (0)