Hello,
For the below code I get an error related to __cinit__ (Cython) when performing a deepcopy
that includes a nest.spatial specification.
I am using NEST 3.3 and Python 3.8.12
Best,
Xavier
----
import nest
import copy
my_dict = {'rule': 'pairwise_bernoulli', 'p':
nest.spatial_distributions.gaussian(nest.spatial.distance, std=1.0), 'mask':
{'circular': {'radius': 4.}}}
new_dict = copy.deepcopy(my_dict)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib64/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib64/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib64/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib64/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib64/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib64/python3.8/copy.py", line 161, in deepcopy
rv = reductor(4)
File "stringsource", line 2, in pynestkernel.SLIDatum.__reduce_cython__
TypeError: no default __reduce__ due to non-trivial __cinit__