Mercurial > pylearn
diff lookup_list.py @ 134:3f4e5c9bdc5e
Fixes to ApplyFunctionDataSet and other things to make learner and mlp work
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Fri, 09 May 2008 17:38:57 -0400 |
parents | b4657441dd65 |
children | ad144fa72bf5 |
line wrap: on
line diff
--- a/lookup_list.py Fri May 09 13:38:54 2008 -0400 +++ b/lookup_list.py Fri May 09 17:38:57 2008 -0400 @@ -49,7 +49,7 @@ The key in example[key] can either be an integer to index the fields or the name of the field. """ - if isinstance(key,int) or isinstance(key,slice) or isinstance(key,list): + if isinstance(key,int) or isinstance(key,slice) or (isinstance(key,list) and all([isinstance(i,int) for i in key])): return self._values[key] else: # if not an int, key must be a name # expecting key to be a valid field name