Mercurial > pylearn
comparison dataset.py @ 227:17c5d080964b
reinstating changeset 216 clobbered accidentally by 218
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Tue, 27 May 2008 13:23:05 -0400 |
parents | 517364d48ae0 |
children | 38beb81f4e8b |
comparison
equal
deleted
inserted
replaced
226:3595ba2610f7 | 227:17c5d080964b |
---|---|
985 | 985 |
986 # check consistency and complete slices definitions | 986 # check consistency and complete slices definitions |
987 for fieldname, fieldcolumns in self.fields_columns.items(): | 987 for fieldname, fieldcolumns in self.fields_columns.items(): |
988 if type(fieldcolumns) is int: | 988 if type(fieldcolumns) is int: |
989 assert fieldcolumns>=0 and fieldcolumns<data_array.shape[1] | 989 assert fieldcolumns>=0 and fieldcolumns<data_array.shape[1] |
990 self.fields_columns[fieldname]=[fieldcolumns] | 990 if 0: |
991 #I changed this because it didn't make sense to me, | |
992 # and it made it more difficult to write my learner. | |
993 # If it breaks stuff, let's talk about it. | |
994 # - James 22/05/2008 | |
995 self.fields_columns[fieldname]=[fieldcolumns] | |
996 else: | |
997 self.fields_columns[fieldname]=fieldcolumns | |
991 elif type(fieldcolumns) is slice: | 998 elif type(fieldcolumns) is slice: |
992 start,step=None,None | 999 start,step=None,None |
993 if not fieldcolumns.start: | 1000 if not fieldcolumns.start: |
994 start=0 | 1001 start=0 |
995 if not fieldcolumns.step: | 1002 if not fieldcolumns.step: |