-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Abstract) reductions don't play well with other operations #2856
Comments
Right, we cannot form operations with reductions. To operate on reductions, we have to wrap them in a U = Field(Average(model.velocities.u))
U / 2 |
We could to suggest wrapping the |
Would this work? julia> Average(model.velocities.u / 2) |
Yup, this works. And that's what I ended up doing. I just thought I'd post it here since I wasn't sure this was expected behavior. Should I close the issue? |
There's no way around it since we certainly cannot compute reductions on the fly, we have to precompute them. But maybe there is a part of the docs or doc string we can improve? Not sure if this was expected because of some part of the docs |
This behavior is by design so closing |
Currently I can't operate on a reduction using
AbstractOperation
s:This is the case for
Average
andIntegral
abstract operators (but notmaximum
andminimum
) and any other operation that I tried.Is this expected?
The text was updated successfully, but these errors were encountered: