Skip to content

fixed GraphCRF._set_size_joint_feature#196

Open
ShigekiKarita wants to merge 2 commits intopystruct:masterfrom
ShigekiKarita:graph-crf-fix
Open

fixed GraphCRF._set_size_joint_feature#196
ShigekiKarita wants to merge 2 commits intopystruct:masterfrom
ShigekiKarita:graph-crf-fix

Conversation

@ShigekiKarita
Copy link

@ShigekiKarita ShigekiKarita commented Jan 25, 2017

I fixed GraphCRF._set_size_joint_feature

The problem is that size_joint_feature set a float value for its shape.
For the details, please read this log.

python plot_grid_crf.py                                                                                              [17:09:30]
Traceback (most recent call last):
  File "plot_grid_crf.py", line 26, in <module>
    clf.fit(X, Y)
  File "/home/skarita/.pyenv/versions/pystruct/lib/python3.5/site-packages/pystruct-0.2.5-py3.5-linux-x86_64.egg/pystruct/learners/
one_slack_ssvm.py", line 409, in fit
    self.w = np.zeros(self.model.size_joint_feature)
TypeError: 'float' object cannot be interpreted as an integer

@amueller
Copy link
Member

Thanks. Can you please add a regression test? Currently tests are passing on Python3.4

@ShigekiKarita
Copy link
Author

Hi. Is there any example or existing regression test?

@adamklec
Copy link

Just ran into this. Would it be possible to merge the fix without a regression test?

@jlmeunier
Copy link
Collaborator

Hi,
it'll be fixed in the coming release.
JL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants