From 50c8afaeecdcce257e6460ea1f7af31177078f56 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Thu, 22 Aug 2024 17:53:49 -0400 Subject: [PATCH] updates for package deprecation warnings --- ogusa/macro_params.py | 4 +++- ogusa/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ogusa/macro_params.py b/ogusa/macro_params.py index ada35a76..3a88765f 100644 --- a/ogusa/macro_params.py +++ b/ogusa/macro_params.py @@ -107,7 +107,9 @@ def get_macro_params(): # find g_y macro_parameters["g_y"] = ( - fred_data_q["GDP Per Capita"].pct_change(periods=4, freq="QE").mean() + fred_data_q["GDP Per Capita"] + .pct_change(periods=4, freq="QE", fill_method=None) + .mean() ) # # estimate r_gov_shift and r_gov_scale diff --git a/ogusa/utils.py b/ogusa/utils.py index 8520e37f..587b5f73 100644 --- a/ogusa/utils.py +++ b/ogusa/utils.py @@ -1,6 +1,6 @@ import pandas as pd import numpy as np -from scipy.stats import kde +from scipy.stats import gaussian_kde import matplotlib.pyplot as plt import requests import urllib3 @@ -203,7 +203,7 @@ def MVKDE( k += 1 freq_mat = np.vstack((age_frequency, income_frequency)).T - density = kde.gaussian_kde(freq_mat.T, bw_method=bandwidth) + density = gaussian_kde(freq_mat.T, bw_method=bandwidth) age_min, income_min = freq_mat.min(axis=0) age_max, income_max = freq_mat.max(axis=0) agei, incomei = np.mgrid[