PlasmaCalcs.tools.array_select.ArraySelectableChildHaver

class PlasmaCalcs.tools.array_select.ArraySelectableChildHaver

Bases: object

class which provides select_… methods for a child object.
indicate the attribute name of the child object via ‘array_selectable_child’ kwarg at subclass creation.
E.g., class SnapList(…, array_selectable_child=’x’)
–> self.select_i_closest(5) will return i such that self.x[i] is closest to 5.
selections which return values (e.g. select_closest, but not select_i_closest)
will always return the values from self, not the child.
E.g. self.select_closest(5) returns self[i] such that self.x[i] is closest to 5.
Implemented using __init_subclass__ to make pretty docstrings.
__init__()

Methods

__init__()