Skip to content

Commit 6404d1d

Browse files
committed
removes checking truth value of an array with more than one element
1 parent 6eeea3f commit 6404d1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

learning.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def __init__(self, examples=None, attrs=None, attrnames=None, target=-1,
8484
else:
8585
self.examples = examples
8686
# Attrs are the indices of examples, unless otherwise stated.
87-
if not attrs and self.examples:
88-
attrs = list(range(len(self.examples[0])))
87+
if attrs is None and self.examples is not None:
88+
attrs = list(range(len(self.examples[0])))
8989
self.attrs = attrs
9090
# Initialize .attrnames from string, list, or by default
9191
if isinstance(attrnames, str):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy