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 a629039 commit 43cf077Copy full SHA for 43cf077
wfdb/io/annotation.py
@@ -908,7 +908,18 @@ def create_label_map(self, inplace=True):
908
if self.custom_labels is not None:
909
self.standardize_custom_labels()
910
for i in self.custom_labels.index:
911
- label_map.loc[i] = self.custom_labels.loc[i]
+ # label_map.loc[i] = self.custom_labels.loc[i]
912
+ label_map["label_store"] = label_map["label_store"].astype(
913
+ "int64"
914
+ )
915
+ cl = self.custom_labels.astype(
916
+ {"label_store": "int64"}
917
+ ).set_index("label_store")
918
+ lm = label_map.set_index("label_store").reindex(
919
+ label_map["label_store"].unique()
920
921
+ lm.update(cl[["symbol", "description"]])
922
+ label_map = lm.reset_index()
923
924
if inplace:
925
self.__label_map__ = label_map
0 commit comments