ContainerOfDict

class PlasmaCalcs.tools.iterables.ContainerOfDict(d)

Bases: Container

a dict-like container.

Methods

enumerate([idx])

iterate through i in idx, yielding (i, self[i]) pairs.

new_empty([fill])

return a new dict of the same shape as self, filled with the value fill.

size([idx])

return the number of objects in the container, or in idx if provided.

_enumerate_all()

iterate through all objs in self, yielding (i, self[i]) pairs.

_size_all()

the number of objects in this container.

_enumerate_all()

iterate through all objs in self, yielding (i, self[i]) pairs.

_size_all()

the number of objects in this container. == len(self.data)

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).
new_empty(fill=UNSET)

return a new dict of the same shape as self, filled with the value fill.

size(idx=None)

return the number of objects in the container, or in idx if provided.