Skip to content

Commit f90f49c

Browse files
Appease mypy
1 parent f125b52 commit f90f49c

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

pytensor/link/numba/dispatch/linalg/decomposition/lu_factor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ def impl(
6060
return impl
6161

6262

63-
def _lu_factor(
64-
A: np.ndarray, overwrite_a: bool = False
65-
) -> tuple[np.ndarray, np.ndarray]:
63+
def _lu_factor(A: np.ndarray, overwrite_a: bool = False):
6664
"""
6765
Thin wrapper around scipy.linalg.lu_factor. Used as an overload target to avoid side-effects on users who import
6866
Pytensor.

pytensor/link/numba/dispatch/linalg/solve/lu_solve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _lu_solve(
9292
trans: int,
9393
overwrite_b: bool,
9494
check_finite: bool,
95-
) -> np.ndarray:
95+
):
9696
"""
9797
Thin wrapper around scipy.lu_solve, used to avoid side effects from numba overloads on users who import Pytensor.
9898
"""
@@ -108,7 +108,7 @@ def lu_solve_impl(
108108
trans: int,
109109
overwrite_b: bool,
110110
check_finite: bool,
111-
) -> Callable[[tuple[np.ndarray, np.ndarray], np.ndarray, bool, bool], np.ndarray]:
111+
) -> Callable[[np.ndarray, np.ndarray, np.ndarray, bool, bool, bool], np.ndarray]:
112112
ensure_lapack()
113113
_check_scipy_linalg_matrix(lu_and_piv[0], "lu_solve")
114114
_check_scipy_linalg_matrix(b, "lu_solve")

pytensor/npy_2_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242

4343
if using_numpy_2:
44-
ndarray_c_version = np._core._multiarray_umath._get_ndarray_c_version()
44+
ndarray_c_version = np._core._multiarray_umath._get_ndarray_c_version() # type: ignore[attr-defined]
4545
else:
4646
ndarray_c_version = np.core._multiarray_umath._get_ndarray_c_version() # type: ignore[attr-defined]
4747

0 commit comments

Comments
 (0)