Skip to content

torch.angle is divergent from numpy.angle #41240

@mruberry

Description

@mruberry
np.angle(-0.31516480719987516)
: 3.141592653589793

vs.

torch.angle(torch.tensor(-0.31516480719987516))
: tensor(0.)

for example.

cc @ezyang @anjali411 @dylanbespalko @mruberry @rgommers

Metadata

Metadata

Labels

module: complexRelated to complex number support in PyTorchmodule: numpyRelated to numpy support, and also numpy compatibility of our operatorstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions