diff --git a/bindings/pydrake/BUILD.bazel b/bindings/pydrake/BUILD.bazel index 4ab6958e7136..eed3acceaa60 100644 --- a/bindings/pydrake/BUILD.bazel +++ b/bindings/pydrake/BUILD.bazel @@ -65,6 +65,7 @@ drake_pybind_library( py_deps = [ ":common_py", ":math_py", + "//bindings/pydrake/util:deprecation_py", ], py_srcs = [ "autodiffutils.py", @@ -132,6 +133,7 @@ drake_pybind_library( py_deps = [ ":common_py", ":math_py", + "//bindings/pydrake/util:deprecation_py", ], py_srcs = ["symbolic.py"], ) diff --git a/bindings/pydrake/autodiffutils_py.cc b/bindings/pydrake/autodiffutils_py.cc index f0a678b629af..b8c7b46f0010 100644 --- a/bindings/pydrake/autodiffutils_py.cc +++ b/bindings/pydrake/autodiffutils_py.cc @@ -17,6 +17,12 @@ namespace pydrake { PYBIND11_MODULE(_autodiffutils_py, m) { m.doc() = "Bindings for Eigen AutoDiff Scalars"; + // Install NumPy warning filtres. + // N.B. This may interfere with other code, but until that is a confirmed + // issue, we should agressively try to avoid these warnings. + py::module::import("pydrake.util.deprecation") + .attr("install_numpy_warning_filters")(); + py::class_ autodiff(m, "AutoDiffXd"); autodiff .def(py::init())