Skip to content

Commit

Permalink
lstsq function added on paddle
Browse files Browse the repository at this point in the history
  • Loading branch information
Risi-droid committed Jul 4, 2023
1 parent 3a17e13 commit 5f830a5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .idea/ivy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/_template__of_Python.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions .idea/runConfigurations/_template__of_py_test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/runConfigurations/pytest_for_functional_frontends.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/pytest_for_functional_layers.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions ivy/functional/backends/paddle/linear_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,7 @@ def vector_to_skew_symmetric_matrix(
row3 = paddle.concat((-a2s, a1s, zs), -1)
# BS x 3 x 3
return paddle.concat((row1, row2, row3), -2)

def lstsq(a, b, rcond=None, out=None):
x, residuals, rank, singular_values = paddle.linalg.lstsq(a, b, rcond=rcond, out=out)
return x, residuals, rank, singular_values

1 comment on commit 5f830a5

@Risi-droid
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.