Skip to content

Commit

Permalink
Python: Programmable Element w/ Dynamic
Browse files Browse the repository at this point in the history
Enable support for dynamic attributes in the `Programmable` element.
This avoids that we need to derive the element to carry around
additional Python state.
https://pybind11.readthedocs.io/en/stable/classes.html#dynamic-attributes
  • Loading branch information
ax3l committed Oct 23, 2023
1 parent 8b6c95e commit e5487d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void init_elements(py::module& m)
)
;

py::class_<Programmable>(me, "Programmable")
py::class_<Programmable>(me, "Programmable", py::dynamic_attr())
.def(py::init<
amrex::ParticleReal,
int>(),
Expand Down

0 comments on commit e5487d1

Please sign in to comment.