interpolate in boolean eval
This commit is contained in:
parent
2ade1a678b
commit
b040a6c425
1 changed files with 3 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
from functools import singledispatch
|
from functools import singledispatch
|
||||||
import operator as op
|
import operator as op
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
from lenses import lens
|
from lenses import lens
|
||||||
|
|
||||||
import stl.ast
|
import stl.ast
|
||||||
|
|
@ -63,4 +64,5 @@ def eval_terms(lineq, x, t):
|
||||||
|
|
||||||
|
|
||||||
def eval_term(x, t):
|
def eval_term(x, t):
|
||||||
return lambda term: term.coeff*x[term.id.name][t]
|
# TODO(lift interpolation much higher)
|
||||||
|
return lambda term: term.coeff*np.interp(t, x.index, x[term.id.name])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue