-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use user-defined NumPy dtypes for AutoDiffXd, Expression, etc.
- Loading branch information
1 parent
e949912
commit 5b552db
Showing
12 changed files
with
602 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
#pragma once | ||
|
||
#include <Eigen/Core> | ||
#include "pybind11/numpy_dtypes_user.h" | ||
#include "pybind11/pybind11.h" | ||
|
||
#include "drake/bindings/pydrake/pydrake_pybind.h" | ||
#include "drake/common/autodiff.h" | ||
|
||
// The macro `PYBIND11_NUMPY_OBJECT_DTYPE` place symbols into the namespace | ||
// The macro `PYBIND11_NUMPY_DTYPE_USER` place symbols into the namespace | ||
// `pybind11::detail`, so we should not place these in `drake::pydrake`. | ||
|
||
PYBIND11_NUMPY_OBJECT_DTYPE(drake::AutoDiffXd); | ||
PYBIND11_NUMPY_DTYPE_USER(drake::AutoDiffXd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.