Skip to content

Commit d772187

Browse files
committed
Remove useless copy of C in numba impl of cho_solve
1 parent a149f6c commit d772187

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/link/numba/dispatch/slinalg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ def impl(C, B, lower=False, overwrite_b=False, check_finite=True):
11231123
_solve_check_input_shapes(C, B)
11241124

11251125
_N = np.int32(C.shape[-1])
1126-
C_copy = _copy_to_fortran_order(C)
1126+
C_f = np.asfortranarray(C)
11271127

11281128
B_is_1d = B.ndim == 1
11291129
if B_is_1d:
@@ -1144,7 +1144,7 @@ def impl(C, B, lower=False, overwrite_b=False, check_finite=True):
11441144
UPLO,
11451145
N,
11461146
NRHS,
1147-
C_copy.view(w_type).ctypes,
1147+
C_f.view(w_type).ctypes,
11481148
LDA,
11491149
B_copy.view(w_type).ctypes,
11501150
LDB,

0 commit comments

Comments
 (0)