Skip to content
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

Tensor support #403

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/windows-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ jobs:
..
if errorlevel 1 exit 1

:: Change path to find eigenpy DLL when creating stub
set OLD_PATH=%PATH%
set PATH=%PATH%;%CD%
:: Build and Install
cmake --build . --config Release --target install
if errorlevel 1 exit 1
:: Set old path
set PATH=%OLD_PATH%

:: Build stubs
git clone https://github.com/jcarpent/pybind11-stubgen.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the manual stub generation is not mandatory anymore.

Maybe, a better fix should be to modify the path in jrlcmakemodule when calling the stub generator.

Expand Down
2 changes: 2 additions & 0 deletions include/eigenpy/eigenpy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ namespace eigenpy {
*/
void EIGENPY_DLLAPI enableEigenPy();

bool EIGENPY_DLLAPI withTensorSupport();

/* Enable the Eigen--Numpy serialization for the templated MatType class.*/
template <typename MatType>
void enableEigenPySpecific();
Expand Down
4 changes: 4 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ set_target_properties(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
add_library(${PYWRAP} SHARED main.cpp)
add_dependencies(python ${PYWRAP})
target_link_libraries(${PYWRAP} PUBLIC ${PROJECT_NAME})

python_build_get_target(python_build_target)
add_dependencies(${PYWRAP} ${python_build_target})

# BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS spews conversion warnings from int to
# long unsigned int. Unfortunately, using literals does not work in a macro. As
# such, this turns them off for the entire wrapper:
Expand Down
8 changes: 8 additions & 0 deletions src/eigenpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,12 @@ void enableEigenPy() {
exposeNoneType();
}

bool withTensorSupport() {
#ifdef EIGENPY_WITH_TENSOR_SUPPORT
return true;
#else
return false;
#endif
}

} // namespace eigenpy
Loading