Temporary fix on the predictN bug.
Temporary fix on the predictN bug.

Currently the predict() function will call a deepcopy to the dlm class itself and the copy is stored as a member variable with the dlm object. As a result, when the predict() is called multiple times, the dlm object is copied recursively and the memory/complxity is exploded in the end.

The temporary solution is to void the _predictModel variable before making the deepcopy. The current predict() complxity is O(n).

TESTED="""
>>> from pydlm import dlm,trend
>>> dlm1 = dlm(range(1000)) + trend(1)
>>> dlm1.fit()
>>> for i in range(1000):
>>> ...   dlm1.predict()
"""

wwrechard/pydlm,wwrechard/PyDLM