Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby typemaps matches to object even though SGMatrix is passed #4177

Open
karlnapf opened this issue Feb 15, 2018 · 1 comment
Open

ruby typemaps matches to object even though SGMatrix is passed #4177

karlnapf opened this issue Feb 15, 2018 · 1 comment

Comments

@karlnapf
Copy link
Member

karlnapf commented Feb 15, 2018

Problems:

Passing matrices to methods that expect SGObject makes typemap match and produces a subsequent failure

require 'shogun'
svm = Shogun::LibSVM.new()
matrix = NMatrix.float(2,2)
svm.set_kernel(matrix)

resulting in TypeError: no implicit conversion of nil into String
See also swig/swig#1199

The error arises since SWIG will call a conversion method after the typemap matched.

karlnapf added a commit that referenced this issue Feb 16, 2018
karlnapf added a commit that referenced this issue Feb 20, 2018
karlnapf added a commit that referenced this issue Feb 27, 2018
karlnapf added a commit that referenced this issue Feb 28, 2018
karlnapf added a commit that referenced this issue Feb 28, 2018
karlnapf added a commit that referenced this issue Mar 1, 2018
karlnapf added a commit to karlnapf/shogun that referenced this issue Mar 6, 2018
karlnapf added a commit to karlnapf/shogun that referenced this issue Mar 7, 2018
karlnapf added a commit to karlnapf/shogun that referenced this issue Mar 19, 2018
@karlnapf karlnapf changed the title ruby typemaps bugs for SGMatrix ruby typemaps matches to object even though SGMatrix is passed Apr 4, 2018
ktiefe pushed a commit to ktiefe/shogun that referenced this issue Jul 30, 2019
ktiefe pushed a commit to ktiefe/shogun that referenced this issue Jul 30, 2019
karlnapf referenced this issue in samdbrice/shogun Aug 5, 2019
@vigsterkr vigsterkr added this to TODO in Shogun Ruby Jan 30, 2020
@vigsterkr vigsterkr mentioned this issue Feb 1, 2020
5 tasks
@vigsterkr
Copy link
Member

i've just created a possible fix for this bug in swig, see swig/swig#1717

@vigsterkr vigsterkr added this to the Shogun 7.0.0 milestone Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Shogun Ruby
  
TODO
Development

No branches or pull requests

2 participants