Skip to content

Scientific notation is not correctly handled for complex dtypes #38285

@anjali411

Description

@anjali411
>>> torch.tensor([2.3+4j, 1e-28j])
tensor([(2.3000+4.0000j), (0.0000+0.0000j)])
>>> torch.tensor([2.3+4j, 1e-28])
tensor([(2.3000+4.0000j), (0.0000+0.0000j)])
>>> torch.tensor([2.3, 1e-28])
tensor([2.3000e+00, 1.0000e-28])

Tests similar to the tests for floating point dtypes in test_print should be added for complex dtypes as well.
cc @ezyang @anjali411 @dylanbespalko

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: complexRelated to complex number support in PyTorchtriagedThis 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