Sparse mean pooling while ignoring padded values

Hi everyone,

I am using a torch.sparse_coo_tensor and I was hoping to do mean reduction along a dimension where the zeroed values are ignored.

The sparse library supports summation and even softmax, but no way to do mean.

Is there a simple trick to getting the mean to work with a sparse tensor using the index values?