-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Add torch.vdot similar to numpy.vdot to calculate the complex dot product #42747
Copy link
Copy link
Closed
Labels
featureA request for a proper, new feature.A request for a proper, new feature.module: 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
Metadata
Metadata
Assignees
Labels
featureA request for a proper, new feature.A request for a proper, new feature.module: 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
For two complex numbers the dot product is defined as:
The
torch.vdot(a, b)function (similar to numpy.vdot)will treat complex numbers differently than dot(a, b). If the first argument is complex the complex conjugate of the first argument will be used for the calculation of the dot product.cc @ezyang @anjali411 @dylanbespalko @mruberry @rgommers