We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6eeea3f commit 6404d1dCopy full SHA for 6404d1d
1 file changed
learning.py
@@ -84,8 +84,8 @@ def __init__(self, examples=None, attrs=None, attrnames=None, target=-1,
84
else:
85
self.examples = examples
86
# Attrs are the indices of examples, unless otherwise stated.
87
- if not attrs and self.examples:
88
- attrs = list(range(len(self.examples[0])))
+ if attrs is None and self.examples is not None:
+ attrs = list(range(len(self.examples[0])))
89
self.attrs = attrs
90
# Initialize .attrnames from string, list, or by default
91
if isinstance(attrnames, str):
0 commit comments