TensorXf object copy and in-placing operation #977
Answered
by
njroussel
Jackson334-prog
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
njroussel
Nov 14, 2023
Replies: 1 comment 1 reply
-
Hi @ljijjiang1234 Assignment to tensor objects is done by calling This interface should improve soon-ish. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Jackson334-prog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @ljijjiang1234
Assignment to tensor objects is done by calling
dr.scatter(tensor.array, new_value, indices)
. Thetensor.array
member is the underlying flat buffer that is used to store the buffer. It's essentially the result ofdr.ravel()
.This interface should improve soon-ish.