Skip to content

Instantly share code, notes, and snippets.

@sileht
Created October 12, 2018 14:24
Show Gist options
  • Save sileht/51ed5e043218ab61928caa398358953d to your computer and use it in GitHub Desktop.
Save sileht/51ed5e043218ab61928caa398358953d to your computer and use it in GitHub Desktop.
example clip
trinary_operations = {
u"clip": numpy.clip,
}
def handle_binary_operator(nodes, granularity, timestamps,
initial_values, is_aggregated, references):
op = nodes[0]
g1, t1, v1, is_a1 = evaluate(nodes[1], granularity, timestamps,
initial_values, is_aggregated, references)
g2, t2, v2, is_a2 = evaluate(nodes[2], granularity, timestamps,
initial_values, is_aggregated, references)
if op in trinary_operations:
g3, t3, v3, is_a3 = evaluate(nodes[3], granularity, timestamps,
initial_values, is_aggregated, references)
...
@vinaykns
Copy link

for the clip operation, for say (array, min, max) type, what will be the values for g2/g3, t2/t3, v2/v3, is_a2/is_a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment