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

Add functionality for cartesian from polar coords #216

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akhilg-nv
Copy link
Collaborator

No description provided.

@akhilg-nv akhilg-nv self-assigned this Sep 19, 2024
def cartesian_via_polar(abs: "tripy.Tensor", angles: "tripy.Tensor") -> "tripy.Tensor":
r"""
Constructs the real-valued cartesian coordinates from magnitude and angle representing polar coordinates. For input
``abs`` and ``angle`` of shape :math:`(m_1, m_2, \ldots, m_i),` this function returns a new real tensor of shape
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``abs`` and ``angle`` of shape :math:`(m_1, m_2, \ldots, m_i),` this function returns a new real tensor of shape
``abs`` and ``angles`` of shape :math:`(m_1, m_2, \ldots, m_i),` this function returns a new real tensor of shape

dtype_variables={"T1": ["float32", "float16", "bfloat16", "float8"]},
dtype_constraints={"abs": "T1", "angles": "T1", constraints.RETURN_VALUE: "T1"},
)
def cartesian_via_polar(abs: "tripy.Tensor", angles: "tripy.Tensor") -> "tripy.Tensor":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this as an API in Tripy and why can't it be a user function? Can you point to similar functionality provided by torch, jax?

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

Successfully merging this pull request may close these issues.

3 participants