-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hi,
I want to calculate the harmonic mean for a tree mesh based on an input tensor mesh. Just like the volume_average function, just a different kind of average.
I am doing it like this:
avg_df = pd.DataFrame([tree_mesh.point2index(fine_mesh.gridCC), df[prop].values]).T
harmonic_means = avg_df.groupby(0)[1].apply(hmean)
The problem is, this is much slower than the volume_average. Is there any way to use the volume_average code to find the harmonic average of the overlapping cells?
Thanks for your assistance!
@jcapriot
Metadata
Metadata
Assignees
Labels
No labels