Skip to content

Unable to overwrite time or component attributes of Trajectory objects  #112

@LuisAbelRT

Description

@LuisAbelRT

After creating a Trajectory object, traj, it is possible to successfully overwrite traj.r by using +=. For instance:

import yupi
x = [2, 5, 3]
traj = yupi.Trajectory(x)

traj.r += 1
traj.r
# Vector([[3.],
          [6.],
          [4.])

However, one gets an Attribute Error when trying to do the analogous change with time or component attributes, as indicted bellow:

traj.t += 1
# Attribute Error: can't set attribute 't'
traj.r.x += 1
# Attribute Error: can't set attribute 'x'

It would be great if one could overwrite other Trajectory's attributes as well.

Metadata

Metadata

Labels

feature ✨New feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions