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

Properly expose std::vector in latest version of Pybind11 #2

Open
apalha opened this issue Sep 9, 2022 · 2 comments
Open

Properly expose std::vector in latest version of Pybind11 #2

apalha opened this issue Sep 9, 2022 · 2 comments
Labels
ONSET issue for onset project

Comments

@apalha
Copy link

apalha commented Sep 9, 2022

Summary

Pybind11 v2.10.0 fails to provide access to method std::vector::resize when exposing std::vector in python.

This issue does not show up in version v2.2.4 since Pybind11 source explicitly exposes this method (this has been removed/commented in latest version).

Reproducibility

This error shows up with the main DARTS code on macOS but not on linux. The example code in this folder of the repository reproduces the error both in macOS and linux.

Tasks

  1. Understand the correct way of exposing std::vector to python
  2. Identify why the main code does not have an issue in linux but the example has
@apalha
Copy link
Author

apalha commented Sep 9, 2022

...

@apalha
Copy link
Author

apalha commented Sep 15, 2022

Building the same code with a make file does not have this issue, but with cmake has this issue. We still want to understand why is this occurring on cmake (which flags are used there that break pybind11, especially since these flags are added by pybind11 module in cmake).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ONSET issue for onset project
Projects
None yet
Development

No branches or pull requests

1 participant