From f59ba031755f6dd26fb4edb18abbdbc8af5db650 Mon Sep 17 00:00:00 2001 From: Nick Tustison Date: Thu, 3 Oct 2024 16:32:21 -0700 Subject: [PATCH] DISP: Address pd warning. --- ants/label/label_overlap_measures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ants/label/label_overlap_measures.py b/ants/label/label_overlap_measures.py index d5c25883..c11658bd 100644 --- a/ants/label/label_overlap_measures.py +++ b/ants/label/label_overlap_measures.py @@ -40,6 +40,6 @@ 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) - df.Label[0] = "All" - + with pd.option_context('mode.chained_assignment', None): + df.Label[0] = "All" return df