From 74fc5cd947e4f761ab348bb2f854f4be738f82d9 Mon Sep 17 00:00:00 2001 From: Hsin Fan <57552401+hsinfan1996@users.noreply.github.com> Date: Sat, 22 Jul 2023 02:15:52 +0800 Subject: [PATCH] Fix a bug --- clmm/theory/parent_class.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clmm/theory/parent_class.py b/clmm/theory/parent_class.py index 404b1577d..ce52cb44c 100644 --- a/clmm/theory/parent_class.py +++ b/clmm/theory/parent_class.py @@ -382,8 +382,6 @@ def set_halo_density_profile(self, halo_profile_model="nfw", massdef="mean", del delta_mdef: int Overdensity number """ - # make case independent - massdef, halo_profile_model = massdef.lower(), halo_profile_model.lower() if self.validate_input: validate_argument(locals(), "massdef", str) validate_argument(locals(), "halo_profile_model", str) @@ -396,6 +394,8 @@ def set_halo_density_profile(self, halo_profile_model="nfw", massdef="mean", del raise ValueError( f"Halo density profile model {halo_profile_model} not currently supported" ) + # make case independent + massdef, halo_profile_model = massdef.lower(), halo_profile_model.lower() # Check if we have already an instance of the required object, if not create one if ( (self.hdpm is None)