huggingface / candle

Minimalist ML framework for Rust
Apache License 2.0
15.91k stars 963 forks source link

Set element in an Tensor #2635

Open DimitriTimoz opened 4 days ago

DimitriTimoz commented 4 days ago

Maybe it's a dumb question and I just didn't well read the doc but Is it possible to assign a value at a position in a tensor? Something like that:

        self.adjacency_matrix.set((x, y), 1);