pycall.rb
pycall.rb copied to clipboard
Calling Python functions from the Ruby language
Hi, we're using pycall 1.3.0, with python 3.5.2 from a venv and ruby 2.6.3p62. We're getting this error when running ```PYCALL_DEBUG_FIND_LIBPYTHON=1 ruby -rpycall -ePyCall.builtins``` ``` DEBUG(find_libpython) find_libpython(nil) DEBUG(find_libpython) investigate_python_config("python3") DEBUG(find_libpython)...
Hello there, First, thanks for this great library! I'm getting issues with a Docker image (locally PyCall works well) ``` FROM ruby:2.7.1 ENV PYTHON /usr/bin/python3 ENV LIBPYTHON /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1 ENV PYTHONHOME...
As part of a university project we tried to explore different options to support PyCall running on TruffleRuby (GraalVM). The choices we made are: - Using wrappers on top of...
Hi, I'm using PyCall and Numpy, trying to call as follows: ```ruby require 'numpy' np = Numpy a = np.array([1, 2, 3, 4]) np.add.at(a, [0, 1], 1) ``` but following...
MSVC does not support initializing the rb_data_type_t structure from a pointer. Error is: ruby_wrapper.c(359): error C2099: initializer is not a constant ruby_wrapper.c(359): error C4047: 'initializing': 'void *' differs in levels...
Hey there, pardon my probably stupid question. Let's assume I have a simple list: words = PyCall.builtins.list(['Foo', 'Bar', 'Foobar']) Is there any way to convert this list into a ruby...
In Python, we can check object identity by `x is y` expression. PyCall should provide a way to do it. ``` >> idx = Pandas::Index.new([*0...3]) >> idx => Int64Index([0, 1,...
In Python, we can delete object's attribute by `del` statement: ```python del obj.attr ``` PyCall should support such a feature. I'd like to support this by adding `PyObjectWrapper#__del__` method.
The following code will generate the warning below: ``` worksheet._images.each {|i| puts i} ``` ``` /usr/local/lib/ruby/gems/2.7.0/gems/pycall-1.3.0/lib/pycall/list.rb:18: warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead ```
We can remove the last empty Hash in the following case in Ruby 2.7 because we can distinguish arguments of Hash and keyword arguments in Ruby 2.7. ``` >> s4...