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

eliminate a potential bug #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

eliminate a potential bug #37

wants to merge 1 commit into from

Conversation

zealseeker
Copy link

example is already an instance class, this code may result in a error of "** is unknow and can't be cast into float" occurs in line 271.

example is already an instance class, this code may result in a error of "** is unknow and can't be cast into float" becuase example is a list of instance.
@@ -264,7 +264,7 @@ def __call__(self, example, result_type=Orange.core.GetValue):
:rtype: :class:`Orange.data.Value`,
:class:`Orange.statistics.Distribution` or a tuple with both
"""
example = Orange.data.Instance(self.domain, example)
#example = Orange.data.Instance(self.domain, example)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the line is at fault, why not just delete it? 😃

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kernc yeah, it should be deleted I think. It was added by @ales-erjavec and I was not sure whether it is necessary in some cases. When I was using NN node to validate a test set, I found that the 'example' is a list of orange object which can't be cast into float. I don't know about the class of instance. It worked after I commented it refering to an old version. ☺️

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if you propose to fix the bug by deleting the line, then delete it. Don't just comment it out for posterity to wonder what's it really all about when the answer is (may be) nothing. 😃

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.

2 participants