-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchmodule: tensor creationtriagedThis 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
Milestone
Description
With PR #38875, linspace and logspace support complex numbers for start and end but they raise noisy warnings even when not required.
import torch
torch.linspace(1j, 2j, steps=100) # Unnecessary warning raised.
torch.linspace(1j, 2j, steps=100, dtype=torch.float) # Valid warning raised/future: throw an error.Warning Message Raised:
UserWarning: As either `start` or `stop` is complex, return type will be the complex dtype corresponding to default dtype.In future, this may throw an error when a non-complex dtype arg is passed as input along with complex valued start or end value. (Triggered internally at ../aten/src/ATen/native/TensorFactories.cpp:468.)
More context
#38875 (comment)
anjali411
Metadata
Metadata
Assignees
Labels
module: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchmodule: tensor creationtriagedThis 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