Greetings, dear SciDB community!
I am trying to come up with more convenient way of masked weighted average operation: the input is source 3D array, 3D array of weights and 2D array - mask. Right now I multiply first two arrays elementwise, then I aggregate results into 2D array and then I multiply it with mask. My main concern is that I don't need to perform any of those actions for elements that correspond to 0-elements from mask, and that's why I think I can accelerate this query.
Do you have any ideas on how I can do it?