Skip to content

Commit

Permalink
Removed unnecessary use of np.divide()
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobcook1995 committed Dec 3, 2024
1 parent 04a116c commit 7c8c0ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions virtual_ecosystem/models/soil/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,9 @@ def calculate_highest_achievable_nutrient_uptake(

# Calculate both the rate of carbon uptake, and the rate at which this carbon is
# assimilated into microbial biomass.
uptake_rate = rate_constant * np.divide(
(labile_nutrient_pool * soil_c_pool_microbe),
(labile_nutrient_pool + saturation_constant),
uptake_rate = rate_constant * (
(labile_nutrient_pool * soil_c_pool_microbe)
/ (labile_nutrient_pool + saturation_constant)
)

return uptake_rate
Expand Down Expand Up @@ -900,9 +900,7 @@ def calculate_nutrient_flows_to_necromass(
The rate at which nitrogen is added to the necromass pool [kg N m^-3 day^-1]
"""

return np.divide(
microbial_changes.necromass_generation, constants.microbial_c_n_ratio
)
return microbial_changes.necromass_generation / constants.microbial_c_n_ratio


def find_necromass_nitrogen_outflows(
Expand Down

0 comments on commit 7c8c0ba

Please sign in to comment.