Open alessiospuriomancini opened 6 years ago
Hi
Could you send the first and last part of the error message you get when you try to compile classy, and also a git diff? It is probably something simple like a missing semicolon, a tab character or a wrong indentation.
Cheers, Thomas
Hi,
Just now I tried removing the spacing and putting everything on one line in classy.pxd :
double function_at_k_and_z (background * pba, spectra * psp, perturbs *ppt, double k, double z, double * pk_ic)
This compiles now. I am unfortunately experiencing a segmentation error now, which I traced back to an integer variable defined in my added function in Class, but I guess this depends on me now, so I will not bother you with that :)
Thank you for your help anyway. I guess you can then confirm that (apart from the segmentation fault which I am getting now) the procedure I described sounds correct in order to implement a new function in the wrapper?
Cheers
I added a function in spectra.c and it works very well producing exactly the output that I would like it to compute, if I call it through Class. Here the declarations in spectra.c and spectra.h:
in spectra.c:
in spectra.h:
Now I would like to call this function in python through the wrapper Classy. Then I write
in classy.pyx:
and in cclassy.pxd I add the same definition that I gave in spectra.h.
However, this seems to ruin everything! I cannot compile the wrapper at all: all the functions, including the other ones already defined, produce errors when I insert this definiton in spectra.h!!
Can anyone help me implement my function in the wrapper Classy?