Skip to content

Commit 1163019

Browse files
committed
changed inv to solve
1 parent 8f90b2f commit 1163019

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rl/chapter8/optimal_exercise_rl.py rl/chapter12/optimal_exercise_rl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def train_lspi(
167167
a_mat /= len(training_data)
168168
a_mat += reg_mat
169169
b_vec /= len(training_data)
170-
wts: np.ndarray = np.linalg.inv(a_mat).dot(b_vec)
170+
wts: np.ndarray = np.linalg.solve(a_mat, b_vec)
171171
fa = replace(
172172
fa,
173173
weights=replace(

0 commit comments

Comments
 (0)