nicknytko / numml

MIT License
12 stars 2 forks source link

Mutable sparse tensors #16

Open Vlad382 opened 6 months ago

Vlad382 commented 6 months ago

Hi!

It would be nice to have a way to assign values to the specific position in the sparse tensor. Are there any workarounds that allow to set a values to the specific index?

nicknytko commented 6 months ago

Great question, the fact that this isn’t already implemented is a bit of an oversight 😅. This should be relatively straightforward to get working with Python’s binsearch library. I can take a look over the next few days (unless you want to try your hand at a PR)