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
Although we don't do anything with p2 after copying it from p1, cleaning up p1 changes p2.lost_particles.
This is because in Particle.copy() we only do a .copy (or slice copy) if the __dict__ item is of type np.array or dict. Unfortunately particle.lost_particles is of type list. Now we could include lists (an other mutables) to the check. However, the index that is also used, means something VERY different for x, px, etc than it does for lost_particles.
The text was updated successfully, but these errors were encountered:
Although we don't do anything with p2 after copying it from p1, cleaning up p1 changes p2.lost_particles.
This is because in Particle.copy() we only do a .copy (or slice copy) if the
__dict__
item is of type np.array or dict. Unfortunately particle.lost_particles is of type list. Now we could include lists (an other mutables) to the check. However, the index that is also used, means something VERY different for x, px, etc than it does for lost_particles.The text was updated successfully, but these errors were encountered: