Round to 14 decimals to avoid problems.

This commit is contained in:
Arno Solin 2013-11-13 17:26:00 +00:00
parent 2303132933
commit a25844ac71

View file

@ -360,8 +360,8 @@ class StateSpace(Model):
# Optimize for cases where time steps occur repeatedly # Optimize for cases where time steps occur repeatedly
else: else:
# Time discretizations # Time discretizations (round to 14 decimals to avoid problems)
dt, _, index = np.unique(dt,True,True) dt, _, index = np.unique(np.round(dt,14),True,True)
# Allocate space for A and Q # Allocate space for A and Q
A = np.empty((n,n,dt.shape[0])) A = np.empty((n,n,dt.shape[0]))