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
It could be useful to access a "column" in a LaserFrame from data, e.g.
frame.agents[propertyname] # Where propertyname is a string, e.g. "age"
A more verbose alternative (admittedly Pythonic, but clunky) is the following:
getattr(frame.agents, propertyname)
Basically, LaserFrame.__getitem__(propertyname) would call getattr() so that laserframe[propertyname] would work. We would not implement LaserFrame.__setitem__() as this should be done through add_scalar_property() etc.
The text was updated successfully, but these errors were encountered:
It could be useful to access a "column" in a LaserFrame from data, e.g.
A more verbose alternative (admittedly Pythonic, but clunky) is the following:
Basically,
LaserFrame.__getitem__(propertyname)
would callgetattr()
so thatlaserframe[propertyname]
would work. We would not implementLaserFrame.__setitem__()
as this should be done throughadd_scalar_property()
etc.The text was updated successfully, but these errors were encountered: