def profileTP(tpClass, tpDim, nRuns):
 tp = tpClass(numberOfCols=tpDim)
 data = numpy.random.randint(0, 2, [tpDim, nRuns]).astype('float32')
 for i in xrange(nRuns):
  d = data[:, i]
  tp.compute(d, True)

def profileTP ( tpClass , tpDim , nRuns ) : tp = tpClass ( numberOfCols = tpDim ) data = numpy . random . randint ( 0 , 2 , [ tpDim , nRuns ] ) . astype ( 'float32' ) for i in xrange ( nRuns ) : d = data [ : , i ] tp . compute ( d , True )
profiling performance of temporalpooler using the python cprofile module and ordered by cumulative time .