Closed jrenaud90 closed 16 hours ago
New tests are showing the issue. working on fix
An equivalent alternative fix is to replace np.asarray
with np.array
. Not sure there is any significant benefit from one way or the other.
Hey @dihm - I have a fix in v0.12.1 which is on pypi now (via pip) and will be on conda forge soon. It is passing my tests but give it a try and see if it works for you! If not please reopen this issue
As noted in Issue #78, if arrays from
WrapCySolverResult
that are stored in a local variable are merely references to the underlying memory held by theWrapCySolverResult
instance. If that instance is destroyed, then the variables are no longer pointing to valid memory.Fix is to add a wrapper
np.copy
around thenp.asarray
in the following return values of theWrapCySolverResult
class.