Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfan1996 committed Jul 21, 2023
1 parent 2607cda commit 74fc5cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clmm/theory/parent_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 74fc5cd

Please sign in to comment.