-
Notifications
You must be signed in to change notification settings - Fork 54
RFC: linalg.outer support batches of vectors #242
Copy link
Copy link
Open
Labels
API changeChanges to existing functions or objects in the API.Changes to existing functions or objects in the API.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.status: BlockedIssue or pull request which is current blocked.Issue or pull request which is current blocked.topic: Linear AlgebraLinear algebra.Linear algebra.
Metadata
Metadata
Assignees
Labels
API changeChanges to existing functions or objects in the API.Changes to existing functions or objects in the API.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.status: BlockedIssue or pull request which is current blocked.Issue or pull request which is current blocked.topic: Linear AlgebraLinear algebra.Linear algebra.
Current Status
Current API spec defines the
linalg.outerbehaviour for one-dimensional vector inputs only.Quoting from the docs.
Proposal
Most of the array/tensor libraries involve the manipulation and usage of batched vectors. It would be worth considering batch support in
linalg.outerfor the Array API standard, instead of only the 1D Vectors. This will also makelinalg.outermore in line with the behaviour offered by other linalg functions in the spec which generally take in an nd-array/tensor.Interestingly
torch.outerwhich also only supports 1d Tensors.numpy.outer, but the behaviour is to flatten the inputs to 1d Vectors in case the input is not already 1-dimensional.This was initially discussed in pytorch/pytorch#63293.
cc @lezcano @rgommers