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

Allow ndarray in elemwise again #124

Closed
hameerabbasi opened this Issue Mar 4, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@hameerabbasi
Collaborator

hameerabbasi commented Mar 4, 2018

I was considering allowing ndarray under elemwise again, provided that f(ndarrays, zeros_in_place_of_COO) is all-zero.

Upsides:

  • No conversion required
  • No matching/sorting required for the ndarray inputs at all. This makes it significantly faster for mixed sparse-dense elemwise.

Downsides:

  • We'll have to broadcast all ndarrays against each other to actually test for densification. This could be huge. Or we can skip this step and risk wrong results.
    • Not so bad considering in almost all use-cases, the ndarrays will be tiny compared to COO.
  • Puts a slight (but not huge) roadblock for arbitrary fill-values.
@mrocklin

This comment has been minimized.

Collaborator

mrocklin commented Mar 4, 2018

Meta-comment: My instinctual reaction here is "I don't know" and "we should really get more use cases so that we have a better metric by which to make these decisions".

@hameerabbasi

This comment has been minimized.

Collaborator

hameerabbasi commented Mar 4, 2018

In that case, I'll leave this open until such time as we can make these decisions.

@mrocklin

This comment has been minimized.

Collaborator

mrocklin commented Mar 4, 2018

Working on this seems fine to me, I'm mostly just thinking about things we can be doing that are more social and less technical. Maybe generalize CSR and target scipy devs?

@hameerabbasi

This comment has been minimized.

Collaborator

hameerabbasi commented Mar 4, 2018

Yes, I'm working on that PEP today. I hope to be done with the PEP soon.

I want things to be in a state that SciPy devs would agree to it. I could push my work to the repo, and if you're interested, you can contribute too. I've sent you an invite.

@hameerabbasi hameerabbasi referenced this issue Apr 18, 2018

Open

Add CSD #125

0 of 7 tasks complete
@hameerabbasi

This comment has been minimized.

Collaborator

hameerabbasi commented Apr 23, 2018

I'm blocked on this by numba/numba#2560 or #126.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment