From 7c8c0ba5b24e1c6e40127014c5f662b1776a0078 Mon Sep 17 00:00:00 2001 From: Jacob Cook Date: Tue, 3 Dec 2024 14:26:56 +0000 Subject: [PATCH] Removed unnecessary use of np.divide() --- virtual_ecosystem/models/soil/pools.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/virtual_ecosystem/models/soil/pools.py b/virtual_ecosystem/models/soil/pools.py index ea8652b56..baa3def1f 100644 --- a/virtual_ecosystem/models/soil/pools.py +++ b/virtual_ecosystem/models/soil/pools.py @@ -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 @@ -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(