Replies: 2 comments 1 reply
-
This is a great question, and I can't immediately think of any good answer. I'm currently exploring a similar issue here: #8991 In this case, it's a function for applying an operator element-wise. It sounds liike we could use a similar function that's something like It would get a little tricky in the case of sparse representations with duplicate indices or with padding... we'd have to think about how to best do that. |
Beta Was this translation helpful? Give feedback.
-
Also wanted to add another datapoint. I really appreciate the support for sparse arrays.
but it's very brittle & prob not the right way to do things. |
Beta Was this translation helpful? Give feedback.
-
In short:
More discussion
Hi, I'm in sparse-land again. (
from jax.experimental import sparse
) and today I was interested in calculating a mean with positive support, i.e. I want to know the mean of non-zero entries.I'd really like the method to be friendly for both dense and sparse matrices (i.e. i'd like to write the function such that
sparsify
can manage the sparse version).Which predictably returns:
Beta Was this translation helpful? Give feedback.
All reactions