belson17 / modred

Modred main repository
BSD 2-Clause "Simplified" License
78 stars 38 forks source link

deepcopy of wrapped custom vectors can cause sanity_check failure #15

Open belson17 opened 7 years ago

belson17 commented 7 years ago

If the python custom vector object wraps an object from C++ or another language, and the data associated with the vector is stored in that foreign object, then python's copy.deepcopy method may not copy the data into a new python object. This point was raised by Philip Sakievich in an email in December 2016. We should at least mention this in the documentation. One possible solution is to check for a custom vector "deepcopy" method.