class pd3::python::core::NodeMap
class pd3::python::core::NodeMap
: public object
Class to wrap internal libpd3._NodeMap
Provides helpers to access and mutate the metadata associated with nodes. For instance in the following case:
print(state.force[node_id]) # May print something like [1 2 3]
force is the NodeMap on Statestate and will return the force associated with node_id.
Note that NodeMap should not be constructed explicitly.
Summary
| Members | Descriptions |
|---|---|
__getitem__(self, Node) → np.ndarray |
Accessor into NodeMap lookup. |
__setitem__(self, Node, np.ndarray) |
Setter for NodeMap lookup. |
Members
__getitem__
__getitem__(self, key : Node) → np.ndarray
Accessor into NodeMap lookup.
Utilize with result = nodemap[node_id].
__setitem__
__setitem__(self, key : Node, value : np.ndarray)
Setter for NodeMap lookup.
Utilize with nodemap[node_id] = np.array([1, 2, 3]).