-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Migrate np.dot and .dot() method calls to @ operator in library code only #787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
a8090bf
3e6820b
5e539a9
ded5b78
83cc6c9
3205c02
3963ef8
bdc7b5b
b85037a
ff4a899
4149f3b
b9289f3
7423037
7b83ad9
0a092b4
6a690ac
e5841f8
6c838ad
2d53230
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,28 +111,28 @@ def nnash(A, B1, B2, R1, R2, Q1, Q2, S1, S2, W1, W2, M1, M2, | |
| F10 = F1 | ||
| F20 = F2 | ||
|
|
||
| G2 = solve(np.dot(B2.T, P2.dot(B2))+Q2, v2) | ||
| G1 = solve(np.dot(B1.T, P1.dot(B1))+Q1, v1) | ||
| H2 = np.dot(G2, B2.T.dot(P2)) | ||
| H1 = np.dot(G1, B1.T.dot(P1)) | ||
| G2 = solve((B2.T @ P2.dot(B2))+Q2, v2) | ||
| G1 = solve((B1.T @ P1.dot(B1))+Q1, v1) | ||
| H2 = G2 @ B2.T.dot(P2) | ||
| H1 = G1 @ B1.T.dot(P1) | ||
|
||
|
|
||
| # break up the computation of F1, F2 | ||
| F1_left = v1 - np.dot(H1.dot(B2)+G1.dot(M1.T), | ||
| H2.dot(B1)+G2.dot(M2.T)) | ||
| F1_right = H1.dot(A)+G1.dot(W1.T) - np.dot(H1.dot(B2)+G1.dot(M1.T), | ||
| H2.dot(A)+G2.dot(W2.T)) | ||
| F1_left = v1 - ((H1.dot(B2)+G1.dot(M1.T)) @ | ||
| (H2.dot(B1)+G2.dot(M2.T))) | ||
| F1_right = H1.dot(A)+G1.dot(W1.T) - ((H1.dot(B2)+G1.dot(M1.T)) @ | ||
| (H2.dot(A)+G2.dot(W2.T))) | ||
| F1 = solve(F1_left, F1_right) | ||
| F2 = H2.dot(A)+G2.dot(W2.T) - np.dot(H2.dot(B1)+G2.dot(M2.T), F1) | ||
| F2 = H2.dot(A)+G2.dot(W2.T) - ((H2.dot(B1)+G2.dot(M2.T)) @ F1) | ||
|
|
||
| Lambda1 = A - B2.dot(F2) | ||
| Lambda2 = A - B1.dot(F1) | ||
| Pi1 = R1 + np.dot(F2.T, S1.dot(F2)) | ||
| Pi2 = R2 + np.dot(F1.T, S2.dot(F1)) | ||
| Pi1 = R1 + (F2.T @ S1.dot(F2)) | ||
| Pi2 = R2 + (F1.T @ S2.dot(F1)) | ||
|
|
||
| P1 = np.dot(Lambda1.T, P1.dot(Lambda1)) + Pi1 - \ | ||
| np.dot(np.dot(Lambda1.T, P1.dot(B1)) + W1 - F2.T.dot(M1), F1) | ||
| P2 = np.dot(Lambda2.T, P2.dot(Lambda2)) + Pi2 - \ | ||
| np.dot(np.dot(Lambda2.T, P2.dot(B2)) + W2 - F1.T.dot(M2), F2) | ||
| P1 = (Lambda1.T @ P1.dot(Lambda1)) + Pi1 - \ | ||
| ((Lambda1.T @ P1.dot(B1)) + W1 - F2.T.dot(M1)) @ F1 | ||
| P2 = (Lambda2.T @ P2.dot(Lambda2)) + Pi2 - \ | ||
| ((Lambda2.T @ P2.dot(B2)) + W2 - F1.T.dot(M2)) @ F2 | ||
|
|
||
| dd = np.max(np.abs(F10 - F1)) + np.max(np.abs(F20 - F2)) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.