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)
cc @ezyang @anjali411 @dylanbespalko @mruberry @gchanan
With PR #38875,
linspaceandlogspacesupport complex numbers for start and end but they raise noisy warnings even when not required.Warning Message Raised:
More context
#38875 (comment)
cc @ezyang @anjali411 @dylanbespalko @mruberry @gchanan