[vardtc missing] performance fixes

This commit is contained in:
mzwiessele 2014-06-27 08:03:45 -07:00
parent 66390cbf8a
commit 83e2df838d
2 changed files with 18 additions and 36 deletions

View file

@ -874,6 +874,9 @@ class Parameterizable(OptimizationHandlable):
"""
Array representing the parameters of this class.
There is only one copy of all parameters in memory, two during optimization.
!WARNING!: setting the parameter array MUST always be done in memory:
m.param_array[:] = m_copy.param_array
"""
if self.__dict__.get('_param_array_', None) is None:
self._param_array_ = np.empty(self.size, dtype=np.float64)