Closed claudio-ICL closed 1 year ago
If you had built Tick in this directory sometime previously, you would have generated some new files when swig was run. I think, if these generated files are found, they are not remade, so you could have a mismatch.
an example of this generated file is lib/swig/tick/array/array_module_wrap.cpp
you can delete these files manually, or run python setup.py clean
to reset your entire build
Hi @PhilipDeegan
That was it. Simply running python setup.py build_ext --inplace
did not seem to pick up the changes in the swig interface file. I am not sure why.
However, a simple workaround was to first clean the result of previous build by running python setup.py clean
, and then re-running python setup.py build_ext --inplace
. This is a bit slower, because everything needs to be re-compiled, but it was enough to make me progress.
I believe we can close this issue.
Hi @PhilipDeegan
I am trying to customize
tick
on my machine. I would like to add a couple of methods to compute compensators of point processes. More precisely, I have added the methodsactivate_ctr
,evaluate_compensator
, andstore_compensator_values
tolib/include/tick/hawkes/simulation/simu_point_process.h
I would like to make
evaluate_compensator
andstore_compensator_values
available from Python. So, I have modifiedlib/swig/tick/hawkes/simulation/simu_point_process.i
as follows:From the console, I run
python setup.py build_ext --inplace
and the C++ code compiles successfully. Unfortunately however, my new methods do not seem to be available from the Python interface. For example, givenmodel
as an instance oftick.hawkes.simulation.simu_hawkes_exp_kernels.SimuHawkesExpKernels
, I get the following error when I try to callstore_compensator_values
:Could you please explain how to add methods to the C++ class in
lib/
and make them available ifrom the Python interface? Any help greatly appreciated! :)