PlasmaCalcs.tools.iterables.ContainerOfArray
- class PlasmaCalcs.tools.iterables.ContainerOfArray(arr)
Bases:
Containera numpy-array-like container.- __init__(arr)
- should set self.data = something related to stuff.
Methods
__init__(arr)enumerate([idx])new_empty([fill])size([idx])Attributes
- property dtype
- alias to self.data.dtype
- enumerate(idx=None)
- iterate through i in idx, yielding (i, self[i]) pairs.If idx is None, iterate through all objs in self (see self._enumerate_all).
- property ndim
- alias to self.data.ndim
- new_empty(fill=UNSET)
- return a new array of the same shape as self, filled with the value fill.
- property shape
- alias to self.data.shape
- size(idx=None)
- return the number of objects in the container, or in idx if provided.