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

Question: How to edit specific indices of a tensor? #1319

Closed
EricLBuehler opened this issue Nov 11, 2023 · 2 comments
Closed

Question: How to edit specific indices of a tensor? #1319

EricLBuehler opened this issue Nov 11, 2023 · 2 comments

Comments

@EricLBuehler
Copy link
Member

Hello everybody,

While developing beam search for candle-sampling, I have run into a small issue where it appears there is no way to edit specific indices of a tensor after creation. For example, in Python the following works for lists (and very similar for pytorch tensors):

values = [[1,2,3],[4,5,6]]
values[0][0] = 0
print(values) #[[0,2,3],[4,5,6]]

Is there an equivalent in Candle which I can use to edit specific indices of a tensor without creating a new tensor?

@ToluClassics
Copy link
Contributor

It seems candle Tensors in general are not mutable;

see: #1163

@EricLBuehler
Copy link
Member Author

True, makes sense.

@EricLBuehler EricLBuehler reopened this Nov 26, 2023
@EricLBuehler EricLBuehler closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants