pycall.rb icon indicating copy to clipboard operation
pycall.rb copied to clipboard

How to use `np.add.at` functions via PyCall

Open msyksphinz-self opened this issue 4 years ago • 1 comments

Hi, I'm using PyCall and Numpy, trying to call as follows:

require 'numpy'
np = Numpy
a = np.array([1, 2, 3, 4])
np.add.at(a, [0, 1], 1)

but following errors:

${HOME}/.gem/ruby/2.5.0/gems/pycall-1.3.1/lib/pycall/pyobject_wrapper.rb:43:in `add': <class 'ValueError'>: invalid number of arguments (PyCall::PyError)

Is it possible to use func.at via PyCall?

msyksphinz-self avatar Jun 13 '20 04:06 msyksphinz-self