-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Closed
Labels
good first issuemodule: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchmodule: numpyRelated to numpy support, and also numpy compatibility of our operatorsRelated 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 moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
import torch
>>> a = torch.tensor([1+2j])
tensor([(1.0000 + 2.0000j)], dtype=torch.complex128)
>>> a.abs()
tensor([ (2.2361 + 0.0000j)], dtype=torch.complex128)
import numpy as np
>>> a=np.array([1+2j])
>>> a.dtype
dtype('complex128')
>>> np_res = np.absolute(a)
array([2.23606798])
>>> np_res.dtype
dtype('float64')
Metadata
Metadata
Assignees
Labels
good first issuemodule: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchmodule: numpyRelated to numpy support, and also numpy compatibility of our operatorsRelated 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 moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module