import condor
class ODE(condor.ODESystem):
a = parameter()
x = state()
y = state() # work around #70
dot[x] = -a * x
if True:
class Ev(ODE.Event):
at_time = 5
update[x] = 1
terminate = True
else:
# function + terminate works
class Ev(ODE.Event):
function = x - 0.5
update[x] = 1
terminate = True
class Traj(ODE.TrajectoryAnalysis):
tf = 10
initial[x] = 1
sim = Traj(a=0.5)
sim_resamp = sim.resample(1.0)
Traceback (most recent call last):
File "/home/krlyons/proj/condor/condor/.scratch/resample_idxs.py", line 30, in <module>
sim_resamp = sim.resample(1.0)
File "/home/krlyons/proj/condor/condor/src/condor/contrib.py", line 738, in resample
xs[idx1 + 1, :] = self._res.x[x_interp_segment.idx1]
~~^^^^^^^^^^^^^
IndexError: index 8 is out of bounds for axis 0 with size 8