Skip to content

Commit 696cec7

Browse files
authored
Merge pull request #748 from ANTsX/label_stats_dtype
2 parents 00ae867 + 44823cb commit 696cec7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ants/label/label_overlap_measures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@ def label_overlap_measures(source_image, target_image):
4040
libfn = get_lib_fn("labelOverlapMeasures%iD" % source_image_int.dimension)
4141
df = libfn(source_image_int.pointer, target_image_int.pointer)
4242
df = pd.DataFrame(df)
43+
# Set Label column to object type as it can contain strings
44+
df['Label'] = df['Label'].astype(object)
4345
df.loc[0, 'Label'] = 'All'
4446
return df

0 commit comments

Comments
 (0)