You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should generally do an overhaul of our object model in Python. The string representations of many classes are counterintuitive and have led to confusion, e.g. series.iterations printed will look as if it is empty:
> s.iterations
<openPMD.Attributable with '0' attributes>
>>> s.iterations[0]
<openPMD.Iteration at t = '0.000000e+00 s'>
Also, now that we have done a redesign of our C++ object model, we can introduce proper semantics for equality comparison. I recently wanted to use record components as keys in a Python dict, this currently leads to crashes. --> #1658
We should consider if we want to overwrite the
__len__
/len()
ofopenPMD_api.Series
.Currently, it (probably) returns the number of attributes as for all Attributable objects in openPMD.
It might be maybe a bit more intuitive if it returns the
len(series.iterations)
instead.First seen by @RTSandberg .
Refs.:
The text was updated successfully, but these errors were encountered: