Mercurial > pylearn
comparison lookup_list.py @ 422:32c5f87bc54e
Added __len__ to HStackedDataSet and replaced default len() by sys.maxint instead of None
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Sat, 19 Jul 2008 14:12:41 -0400 |
parents | 7c5e5356cb11 |
children | 3da4961cc80b |
comparison
equal
deleted
inserted
replaced
421:e01f17be270a | 422:32c5f87bc54e |
---|---|
27 @todo: Convert this documentation into doctest | 27 @todo: Convert this documentation into doctest |
28 format, and actually perform doctest'ing: | 28 format, and actually perform doctest'ing: |
29 U{http://epydoc.sourceforge.net/manual-epytext.html#doctest-blocks} | 29 U{http://epydoc.sourceforge.net/manual-epytext.html#doctest-blocks} |
30 """ | 30 """ |
31 def __init__(self,names=[],values=[]): | 31 def __init__(self,names=[],values=[]): |
32 print names,values | |
32 assert len(values)==len(names) | 33 assert len(values)==len(names) |
33 self.__dict__['_values']=values | 34 self.__dict__['_values']=values |
34 self.__dict__['_name2index']={} | 35 self.__dict__['_name2index']={} |
35 self.__dict__['_names']=names | 36 self.__dict__['_names']=names |
36 for i in xrange(len(values)): | 37 for i in xrange(len(values)): |