Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic broadcasting #138

Closed
jank324 opened this issue Mar 27, 2024 · 2 comments
Closed

Automatic broadcasting #138

jank324 opened this issue Mar 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jank324
Copy link
Member

jank324 commented Mar 27, 2024

In #116, we added a vectorised way of using Cheetah. This means that instead of either one of these

elem1 = Drift(length=0.3142)
elem2 = Drift(length=torch.tensor(0.3142))

you have to remember to set properties in the correct dimension even if you are not using multiple dimensions or only a single value for that property

elemt3 = Drift(length=torch.tensor([0.3142])

By introducing automatic broadcasting (in a similar way to how PyTorch does it), we want to be able to use either one of the examples in the first code block while tracking, for example, a beam with 1000 different properties.

@jank324 jank324 added the enhancement New feature or request label Mar 27, 2024
@cr-xu
Copy link
Member

cr-xu commented Oct 2, 2024

Is this now considered solved by #208?

@jank324
Copy link
Member Author

jank324 commented Oct 2, 2024

Is this now considered solved by #208?

Yes!

@jank324 jank324 closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants