-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pydrake autodiff, symbolic: Add initial tests for scalar and vectorized math #8427
pydrake autodiff, symbolic: Add initial tests for scalar and vectorized math #8427
Conversation
+@soonho-tri for feature review, please. Review status: 0 of 8 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
58311cd
to
53f02fa
Compare
Check point. Reviewed 4 of 8 files at r1. bindings/pydrake/autodiffutils_py.cc, line 69 at r1 (raw file):
BTW, this comment is outdated now. bindings/pydrake/symbolic_py.cc, line 40 at r1 (raw file):
Could you explain why we need this? If it's necessary, I will update other classes here (i.e. bindings/pydrake/util/wrap_pybind.h, line 14 at r1 (raw file):
Could you update the description to include bindings/pydrake/util/wrap_pybind.h, line 15 at r1 (raw file):
I think we do not do this anymore? Is it worth documenting why we stopped doing the check? bindings/pydrake/util/wrap_pybind.h, line 22 at r1 (raw file):
BTW, missing bindings/pydrake/util/wrap_pybind.h, line 31 at r1 (raw file):
BTW, make those pointers to be From* const m_{};
To* const mirror_{}; Comments from Reviewable |
First pass complete. Also please assign it to a platform-reviewer. Reviewed 4 of 8 files at r1. bindings/pydrake/test/autodiffutils_test.py, line 37 at r1 (raw file):
I'm not sure that the use of bindings/pydrake/test/math_test_util.py, line 12 at r1 (raw file):
BTW, to my standard, changing bindings/pydrake/test/math_test_util.py, line 15 at r1 (raw file):
Could you add a documentation for this? # Checks if `actual` is `expected_scalar`. bindings/pydrake/test/math_test_util.py, line 18 at r1 (raw file):
I guess the signature should be bindings/pydrake/test/math_test_util.py, line 52 at r1 (raw file):
From bindings/pydrake/test/math_test_util.py, line 80 at r1 (raw file):
This method converts an array of bindings/pydrake/test/math_test_util.py, line 84 at r1 (raw file):
BTW, meant common/test/autodiff_overloads_test.cc, line 55 at r1 (raw file):
Is it worth adding Comments from Reviewable |
bindings/pydrake/symbolic_py.cc, line 40 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
OK It was just a local need for testing.
I believe this worked before because either (a) Didn't really try tracking down why specifically, but the issue was solvable by using I'm not sure if it's necessary for other things, but perhaps it would be useful? Comments from Reviewable |
Review status: all files reviewed at latest revision, 14 unresolved discussions. bindings/pydrake/symbolic_py.cc, line 40 at r1 (raw file): Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Yeah, I had the issue. Good to know that it's mainly for the testing. I'll add more if I find use cases in the future. Thank you. Comments from Reviewable |
a57d421
to
24131b6
Compare
Review status: 1 of 8 files reviewed at latest revision, 9 unresolved discussions. bindings/pydrake/autodiffutils_py.cc, line 69 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/autodiffutils_test.py, line 37 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/util/wrap_pybind.h, line 14 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/util/wrap_pybind.h, line 22 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/util/wrap_pybind.h, line 31 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. common/test/autodiff_overloads_test.cc, line 55 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/math_test_util.py, line 12 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. Figgered that bindings/pydrake/test/math_test_util.py, line 15 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/math_test_util.py, line 18 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/math_test_util.py, line 52 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/math_test_util.py, line 80 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/math_test_util.py, line 84 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. Comments from Reviewable |
+@sherm1 for platform review, please (given that Soonho is feature reviewing) Review status: 1 of 8 files reviewed at latest revision, 8 unresolved discussions. Comments from Reviewable |
bindings/pydrake/util/wrap_pybind.h, line 15 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. Comments from Reviewable |
24131b6
to
910f248
Compare
Reviewed 4 of 8 files at r2, 4 of 4 files at r3. Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions. bindings/pydrake/test/algebra_test_util.py, line 11 at r3 (raw file):
BTW, nit, capitalize bindings/pydrake/test/algebra_test_util.py, line 54 at r3 (raw file):
BTW, missing Comments from Reviewable |
910f248
to
7444ec4
Compare
Review status: 3 of 8 files reviewed at latest revision, 2 unresolved discussions. bindings/pydrake/test/algebra_test_util.py, line 11 at r3 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. bindings/pydrake/test/algebra_test_util.py, line 54 at r3 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done. Comments from Reviewable |
00a0753
to
863844b
Compare
863844b
to
1ac7dd5
Compare
Reviewed 5 of 6 files at r4. Comments from Reviewable |
BTW @RussTedrake Can I ask if there are any other expressions that you're finding that you would like me to guarantee behavior for? (scalar and array algebra-wise) |
not off the top of my head. but thanks! |
Platform Reviewed 3 of 8 files at r2, 1 of 4 files at r3, 5 of 5 files at r4. Comments from Reviewable |
Relates #8116 and #8315
The purpose of this PR is to (a)
lock downelucidate behavior with NumPy arrays and (b) provide a basis for seeing how the solution to #8315 will affect the behavior.This change is