You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MovingAverages is supported in legacy and documented. It needs to be migrated to the new API.
from deephaven_legacy.MovingAverages import ByEmaSimple
from deephaven import time_table
import random
ema1sec = ByEmaSimple('BD_SKIP','BD_SKIP','TIME',10,'SECONDS', type='LEVEL')
result = time_table('00:00:01').update(formulas=["Sym = (char)(int)random.randint(65, 70)", "Numbers = (int)random.randint(0, 100)"])
ema_data = result.view(formulas=["EMA_data = ema1sec.update(Timestamp, Numbers)"]).last_by()
ema_data_grouped = result.view(formulas=["Sym", "EMA_data = ema1sec.update(Timestamp, Numbers, Sym)"]).last_by(by=["Sym"]).sort(order_by=["Sym"])
It seems to me that during formula evaluation this will lead to a round-trip from Java to Python then back just to call 'ema1sec.update' if we wrap the result of 'ByEmaSimple' call in Python. What we want is to unwrap 'ema1sec' during formula parsing and generate evaluation code with the wrapped Java object.
The more generalized solution for minimizing Python/Java boundary crossing is to be addressed by #2363
The text was updated successfully, but these errors were encountered:
Per Pete, the design and implementation of MAs are to be reworked soon, we should definitely wait for that to be done first before take up this ticket.
The MovingAverages is supported in legacy and documented. It needs to be migrated to the new API.
It seems to me that during formula evaluation this will lead to a round-trip from Java to Python then back just to call 'ema1sec.update' if we wrap the result of 'ByEmaSimple' call in Python. What we want is to unwrap 'ema1sec' during formula parsing and generate evaluation code with the wrapped Java object.
The more generalized solution for minimizing Python/Java boundary crossing is to be addressed by #2363
The text was updated successfully, but these errors were encountered: