Skip to content

Allow ndarray in elemwise again #124

Closed

Description

@hameerabbasi

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.

Activity

  1. added
    enhancement
    on Mar 4, 2018
  2. mrocklin commented on Mar 4, 2018

    @mrocklin
    Contributor

    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".

  3. hameerabbasi commented on Mar 4, 2018

    @hameerabbasi
    CollaboratorAuthor

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

  4. mrocklin commented on Mar 4, 2018

    @mrocklin
    Contributor

    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?

  5. hameerabbasi commented on Mar 4, 2018

    @hameerabbasi
    CollaboratorAuthor

    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.

  6. hameerabbasi commented on Apr 23, 2018

    @hameerabbasi
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions