Skip to content

Commit bbe3eaf

Browse files
Better typehints on user-facing cho_solve
1 parent 8515fcd commit bbe3eaf

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

pytensor/tensor/slinalg.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,20 @@ def inplace_on_inputs(self, allowed_inplace_inputs: list[int]) -> "Op":
376376
return self
377377

378378

379-
def cho_solve(c_and_lower, b, *, check_finite=True, b_ndim: int | None = None):
379+
def cho_solve(
380+
c_and_lower: tuple[TensorLike, bool],
381+
b: TensorLike,
382+
*,
383+
check_finite: bool = True,
384+
b_ndim: int | None = None,
385+
):
380386
"""Solve the linear equations A x = b, given the Cholesky factorization of A.
381387
382388
Parameters
383389
----------
384-
(c, lower) : tuple, (array, bool)
390+
c_and_lower : tuple of (TensorLike, bool)
385391
Cholesky factorization of a, as given by cho_factor
386-
b : array
392+
b : TensorLike
387393
Right-hand side
388394
check_finite : bool, optional
389395
Whether to check that the input matrices contain only finite numbers.

0 commit comments

Comments
 (0)