autodiffutils_py.cc File Reference
#include <pybind11/eigen.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "drake/bindings/pydrake/autodiff_types_pybind.h"
Include dependency graph for autodiffutils_py.cc:


template<typename Derived >
AutoDiffXd eval (const Eigen::AutoDiffScalar< Derived > &x)
 Force Eigen to evaluate an autodiff expression. More...
 PYBIND11_MODULE (_autodiffutils_py, m)

Function Documentation

AutoDiffXd eval ( const Eigen::AutoDiffScalar< Derived > &  x)

Force Eigen to evaluate an autodiff expression.

We need this function because, for example, adding two Eigen::AutoDiffXd values produces an Eigen::AutoDiffScalar<Eigen::CWiseBinaryOp> which cannot be returned to python. This just forces an evaluation and conversion to AutoDiffXd which would normally happen automatically in C++.

Here is the caller graph for this function:

PYBIND11_MODULE ( _autodiffutils_py  ,

Here is the call graph for this function: