def DACrange(n):
 return numpy.arange(0.0, 256.0, (255.0 / (n - 1))).astype(numpy.uint8)

def DACrange ( n ) : return numpy . arange ( 0.0 , 256.0 , ( 255.0 / ( n - 1 ) ) ) . astype ( numpy . uint8 )
returns an array of n dac values spanning 0-255 .