Skip to content

Commit

Permalink
removed out argument from torch.dot since handle_out_argument decorat…
Browse files Browse the repository at this point in the history
…or does the job and changed backend function to matmul since torch.dot works only with 1D. fixed ivy.dot docs.
  • Loading branch information
TugayGul committed Aug 15, 2023
1 parent e53edba commit 6dc67c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def dot(
*,
out: Optional[torch.Tensor] = None,
) -> torch.Tensor:
return torch.dot(a, b, out=out)
return torch.matmul(a, b)


dot.support_native_out = True
2 changes: 1 addition & 1 deletion ivy/functional/ivy/experimental/linear_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ def dot(
>>> a = ivy.array([[1, 2], [3, 4]])
>>> b = ivy.array([[5, 6], [7, 8]])
>>> c = ivy.empty_like(d)
>>> c = ivy.empty_like(a)
>>> ivy.dot(a, b, out=c)
>>> print(c)
ivy.array([[19, 22],
Expand Down

0 comments on commit 6dc67c2

Please sign in to comment.