-
Notifications
You must be signed in to change notification settings - Fork 53
Add specification for computing the matrix product (linalg: matmul) #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Should we require that 0-dimensional arrays give an error? Note that the PEP says they should. |
@asmeurer Thanks for the suggestion. I have documented the exceptions in accordance with the PEP (0d) and NumPy (nd). |
Latest merge resolves build failures. CI is now passing. |
0607525
to
138e963
Compare
This PR has been open for some time without comment and has been discussed/approved during meetings. Will merge, and we can submit follow-up PRs should any issues/concerns arise. |
This PR
Notes
NumPy supports
gufunc
keyword arguments:out
,casting
,dtype
,subok
,order
, etc.NumPy, CuPy, Torch, MXNet support providing an output array.
JAX supports specifying a
precision
keyword argument.TF supports various keywords for transposing array arguments (
transpose_a
,transpose_b
), conjugating array arguments (adjoint_a
,adjoint_b
), and indicating whether an array argument is sparse (a_is_sparse
,b_is_sparse
). TF is alone in supporting these arguments.This PR follows PEP 465 and the semantics of the built-in
@
operator.