ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
413 stars 41 forks source link

Export nary_set_pointer method #170

Closed ankane closed 2 years ago

ankane commented 4 years ago

Hi, this makes the nary_set_pointer method available to other gems. With this, I was able to create a bridge between Torch.rb and Numo where an update in one object is reflected in the other, just like PyTorch has a bridge with NumPy. Here's the code if you're interested.

I'm not very good with C, so there may be a better way to do this.