Skip to content

Implementing isneginf and isposinf #252

Closed

Description

@jakirkham

Would be nice if isneginf and isposinf were implemented for sparse arrays.

Activity

  1. pentschev commented on May 13, 2019

    @pentschev
    Contributor

    Just for completeness, copying my comment from dask/dask#4708 here as well:

    I don't know if we want to have that implemented in Sparse. I was only using Sparse as an example, CuPy also doesn't implement it.

    There's another good point (at least on the NumPy side), it is faster compute that using np.equal, as shown here.

    In my opinion, it should remain as it is in this PR, seems faster and more reliable when dealing with other NumPy-like libraries.

  2. hameerabbasi commented on May 14, 2019

    @hameerabbasi
    Collaborator

    I'm working on this -- Although the long-term solution might be to turn these into ufuncs in NumPy -- I'm surprised they aren't already.

  3. pentschev commented on May 14, 2019

    @pentschev
    Contributor

    There's a discussion somewhat related to this in numpy/numpy#13100. I'm not sure such functions would be turned into ufuncs, even though it would make lots of things simpler for other libraries (but maybe not to NumPy itself).

  4. hameerabbasi commented on May 14, 2019

    @hameerabbasi
    Collaborator

    This is in, thanks for the suggestion @jakirkham and the insight, @pentschev!

  5. pentschev commented on May 14, 2019

    @pentschev
    Contributor

    Thanks @hameerabbasi for doing this so quickly!

  6. jakirkham commented on May 14, 2019

    @jakirkham
    Author

    Great! Thanks for handling this @hameerabbasi. Am pleased to see how straightforward that change was. 😄

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions