Skip to content
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

dpctl.tensor.logaddexp does not always return nan when one operand is not nan #1321

Closed
ndgrigorian opened this issue Aug 2, 2023 · 2 comments
Assignees

Comments

@ndgrigorian
Copy link
Collaborator

For example:

In [1]: import dpctl.tensor as dpt

In [2]: x1, x2 = dpt.asarray(1., dtype=dpt.float64), dpt.asarray(dpt.nan, dtype=dpt.float64)

In [3]: dpt.logaddexp(x1, x2)
Out[3]: usm_ndarray(1.69314718)

In [4]: dpt.logaddexp(x2, x1)
Out[4]: usm_ndarray(nan)

This should return nan in both cases

@ndgrigorian ndgrigorian self-assigned this Aug 2, 2023
@ndgrigorian
Copy link
Collaborator Author

ndgrigorian commented Aug 3, 2023

Another case:

In [4]: x1 = dpt.asarray(dpt.inf)

In [5]: x2 = dpt.asarray(dpt.inf)

In [6]: dpt.logaddexp(x1, x2)
Out[6]: usm_ndarray(nan)

Should be dpt.inf

@ndgrigorian
Copy link
Collaborator Author

This issue was resolved in #1324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant