Rename potrs to cholesky_solve (#15334)

Summary:
Changelog:
- Renames `potrs` to `cholesky_solve` to remain consistent with Tensorflow and Scipy (not really, they call their function chol_solve)
- Default argument for upper in cholesky_solve is False. This will allow a seamless interface between `cholesky` and `cholesky_solve`, since the `upper` argument in both function are the same.
- Rename all tests
- Create a tentative alias for `cholesky_solve` under the name `potrs`, and add deprecated warning to not promote usage.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15334

Differential Revision: D13507724

Pulled By: soumith

fbshipit-source-id: b826996541e49d2e2bcd061b72a38c39450c76d0
This commit is contained in:
vishwakftw
2018-12-19 12:11:49 -08:00
committed by Facebook Github Bot
parent 33018e4e09
commit 41e7e1bc40
17 changed files with 175 additions and 146 deletions

View File

@ -539,6 +539,13 @@ cholesky(upper=False) -> Tensor
See :func:`torch.cholesky`
""")
add_docstr_all('cholesky_solve',
r"""
cholesky_solve(input2, upper=False) -> Tensor
See :func:`torch.cholesky_solve`
""")
add_docstr_all('clamp',
r"""
clamp(min, max) -> Tensor
@ -1698,13 +1705,6 @@ potri(upper=True) -> Tensor
See :func:`torch.potri`
""")
add_docstr_all('potrs',
r"""
potrs(input2, upper=True) -> Tensor
See :func:`torch.potrs`
""")
add_docstr_all('pow',
r"""
pow(exponent) -> Tensor