Skip to content

Commit

Permalink
PERF: fix type compatibility and style with accessing pandas dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
stnava committed Nov 27, 2024
1 parent abb52af commit e114676
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ants/label/label_overlap_measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ def label_overlap_measures(source_image, target_image):
libfn = get_lib_fn("labelOverlapMeasures%iD" % source_image_int.dimension)
df = libfn(source_image_int.pointer, target_image_int.pointer)
df = pd.DataFrame(df)
with pd.option_context('mode.chained_assignment', None):
df.Label[0] = "All"
df.loc[0, 'Label'] = 'All'.astype(object)
return df

0 comments on commit e114676

Please sign in to comment.