OliverFM / rust_light

A tensor processing library in rust.
MIT License
3 stars 0 forks source link

Create a mutable Tensor for Convenience #18

Open OliverFM opened 1 year ago

OliverFM commented 1 year ago

It would be very convenient to have a mutable version of a tensor, mostly for doing constructions of new Tensors.

After #17 merged, this is no longer straightforward. So a good option is to create a completely new struct that is mutable as does not implement TensorLike. The only operations that it would support are:

  1. Indexing
  2. Mutating values.
  3. Potentially Scalar multiplication.
  4. Converting back to an immutable Tensor.