Skip to content

Commit

Permalink
fix scipy.integrate.simps expired deprecation and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
vloison committed Jun 26, 2024
1 parent 5a453ff commit 00db0a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions fadin/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import matplotlib.pyplot as plt
import numpy as np

from fadin.utils.utils import optimizer, projected_grid, \
init_kernel_parameters
from fadin.utils.utils import optimizer, projected_grid
from fadin.utils.compute_constants import compute_constants_fadin
from fadin.loss_and_gradient import compute_gradient_fadin
from fadin.kernels import DiscreteKernelFiniteSupport
from fadin.init import init_hawkes_params



class FaDIn(object):
"""Define the FaDIn framework for estimated Hawkes processes.
Expand Down
4 changes: 2 additions & 2 deletions fadin/utils/utils_simu.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from scipy.optimize import minimize_scalar
from scipy.interpolate import interp1d
from scipy.integrate import simps
from scipy.integrate import simpson
import scipy.stats as stats


Expand Down Expand Up @@ -84,7 +84,7 @@ def __init__(self, custom_density, params=dict(), kernel_length=10):
# function to normalise the pdf over chosen domain

def normalisation(self, x):
return simps(self.pdf(x), x)
return simpson(self.pdf(x), x)

def create_cdf_ppf(self):
# define normalization support with the given kernel length
Expand Down

0 comments on commit 00db0a7

Please sign in to comment.