-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
module: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
Linspace behavior for complex dtypes seems buggy (atleast on the cpu side)
Additionally the document says start and end should be float
which should be changed to float or complex
(similar comment for logspace as well)
>>> torch.linspace(-10j, 10j, steps=5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: value cannot be converted to type float without overflow: (-0,-10)
>>> torch.from_numpy(numpy.linspace(-10j,10j,4))
tensor([(0.0000-10.0000j), (0.0000-3.3333j), (0.0000+3.3333j), (0.0000+10.0000j)],
dtype=torch.complex128)
Metadata
Metadata
Assignees
Labels
module: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module