ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Complex

Open kenani-dev opened this issue 2 years ago • 1 comments

Adding PyTorch Creation Ops "torch.complex" to Ivy.

This is a partial solution that needs further testing.

Close #16974

kenani-dev avatar Jun 17 '23 15:06 kenani-dev

Hi, I already have the link to my issue, I used this format:

Close #Issue_number And in my PR's description, it says:

Close #16974

https://github.com/unifyai/ivy/issues/16974

Which links to this issue:

https://github.com/unifyai/ivy/issues/16974

If I linked it incorrectly, could I get more clarification on how to correct it?

Thanks,

Kenani

On Mon, Jun 19, 2023 at 8:25 PM Leaves @.***> wrote:

If you are working on an open task, please edit the PR description to link to the issue you've created.

For more information, please check ToDo List Issues Guide https://unify.ai/docs/ivy/overview/contributing/the_basics.html#todo-list-issues .

Thank you 🤗

— Reply to this email directly, view it on GitHub https://github.com/unifyai/ivy/pull/17083#issuecomment-1597522066, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4Z6QZYFRH3OCXLB4TXSJ3XMCDSHANCNFSM6AAAAAAZKI4QP4 . You are receiving this because you authored the thread.Message ID: @.***>

kenani-dev avatar Jun 20 '23 12:06 kenani-dev

This PR has been labelled as stale because it has been inactive for more than 7 days. If you would like to continue working on this PR, then please add another comment or this PR will be closed in 7 days.

ivy-seed avatar Jul 04 '23 05:07 ivy-seed

Still fixing the failing tests.

kenani-dev avatar Jul 07 '23 09:07 kenani-dev

This fails all the test since ivy.complex does not have backend implementations. Another way to implement this frontend function is by composing existing ivy functions so that we won't need backend implementations. I would suggest creating a complex tensor ret of the same shape as a and b. Then assign real values of ret to a and imaginary values into b

Example:

assert a.shape == b.shape, 'a and b must have the same shapes`
ret = ivy.zeros(shape=a.shape, dtype=ivy.complex64)
set real values of ret to a, imaginary values to b
return ret

zhumakhan avatar Jul 20 '23 11:07 zhumakhan

This PR has been closed because it has been marked as stale for more than 7 days with no activity.

ivy-seed avatar Jul 29 '23 05:07 ivy-seed