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

Fix load_component for label-dict #1859

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

noraabiakar
Copy link
Contributor

The cable_component::component property in pyarb returns a cable_cell_variant object which is an alias forstd::variant<arb::morphology, arb::label_dict, arb::decor, arb::cable_cell>.
pybind11 is usually able to present an std::variant object to a python user as the underlying type of the object, but only if there exists a pybind11::class representation of said type.
In this case, pybind11 doesn't have a class representation for arb::label_dict, it has instead a class representation for pyarb::label_dict_proxy. This discrepancy makes it not possible to use load_component to load a label_dict using the pyarb library. This PR fixes the issue.

@thorstenhater thorstenhater self-assigned this Mar 15, 2022
Copy link
Contributor

@thorstenhater thorstenhater left a comment

Choose a reason for hiding this comment

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

👍

@noraabiakar noraabiakar merged commit 1971828 into arbor-sim:master Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants