2020-10-16 16:55:14 -04:00
|
|
|
# Copyright 2020 Google LLC
|
Add Cholesky, QR, and Triangular solve implementations.
* Adds lax.{cholesky,triangular_solve,qr}. Adds a JVP for Cholesky.
* Adds a transpose rule for add_p, needed by the Cholesky JVP.
* Adds np.linalg.{cholesky,qr,dot,matmul,trace}.
* Adds scipy.linalg.{cholesky,qr,solve_triangular,tril,triu}.
Pair programmed with mattjj.
2018-12-13 13:03:08 -05:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2020-10-16 16:55:14 -04:00
|
|
|
# flake8: noqa: F401
|
|
|
|
|
|
|
|
from jax._src.scipy.linalg import (
|
|
|
|
block_diag,
|
|
|
|
cholesky,
|
|
|
|
cho_factor,
|
|
|
|
cho_solve,
|
|
|
|
det,
|
|
|
|
eigh,
|
2021-05-03 11:27:07 -04:00
|
|
|
eigh_tridiagonal,
|
2020-10-16 16:55:14 -04:00
|
|
|
expm,
|
|
|
|
expm_frechet,
|
|
|
|
inv,
|
|
|
|
lu,
|
|
|
|
lu_factor,
|
|
|
|
lu_solve,
|
2021-07-20 13:12:13 -04:00
|
|
|
polar,
|
2020-10-16 16:55:14 -04:00
|
|
|
qr,
|
|
|
|
solve,
|
|
|
|
solve_triangular,
|
|
|
|
svd,
|
|
|
|
tril,
|
|
|
|
triu,
|
|
|
|
)
|
2021-07-20 11:28:53 -04:00
|
|
|
|
|
|
|
from jax._src.lax.polar import (
|
|
|
|
polar_unitary
|
|
|
|
)
|