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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Orange/classification/neural.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. 😃

# transform example to numpy
if not self.domain.class_vars:
example = [example[i] for i in range(len(example)-1)]
Expand Down