Template Expressions issue #822
-
|
Hello! The expressions I am looking for are of the form: (X and Y can be anything, a constant, a unary function, a binary function, a combination of the preceding... the all being expected to return 0 or 1) I defined the following template expression: But I get the following error: (I have tried with (x, y) -> x > y ? 1 : 0 instead of greater(x, y), but got the same error...) Any advice? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
|
Hey, sorry, I didn't yet add the For now you can manually unpack it to vector form and then wrap it up as a ValidVector again: ((; f, g), (x1, x2, x3, x4)) -> begin
f_x = f(x1, x2)
g_x = g(x3, x4)
raw = [fxi > gxi ? one(fxi) : zero(fxi) for (fxi, gxi) in zip(f_x.x, g_x.x)]
ValidVector(raw, f_x.valid && g_x.valid)
end |
Beta Was this translation helpful? Give feedback.
The fix is live on PySR v1.4.0