segfault if cosmology object is deepcopied
erykoff opened this issue · comments
erykoff commented
I suppose this is something that isn't supported, but should probably raise an exception rather than completely segfaulting...(tested on both linux and mac)
In [2]: import copy
In [3]: cosmo=esutil.cosmology.Cosmo()
In [4]: cosmo.Dl(0,1.0)
Out[4]: 4625.360378585448
In [5]: cosmo2=copy.deepcopy(cosmo)
In [6]: cosmo2.Dl(0,1.0)
Segmentation fault
Erin Sheldon commented
I put in some code so this works, see the copy branch.
It isn't a proper implementation but seems to work.