def gencastshapes():
 for n in range(32):
  (yield [n])
 ndim = randrange(4, 6)
 minshape = (1 if (randrange(100) > 80) else 2)
 (yield [randrange(minshape, 5) for _ in range(ndim)])
 ndim = randrange(2, 4)
 minshape = (1 if (randrange(100) > 80) else 2)
 (yield [randrange(minshape, 5) for _ in range(ndim)])

def gencastshapes ( ) : for n in range ( 32 ) : ( yield [ n ] ) ndim = randrange ( 4 , 6 ) minshape = ( 1 if ( randrange ( 100 ) > 80 ) else 2 ) ( yield [ randrange ( minshape , 5 ) for _ in range ( ndim ) ] ) ndim = randrange ( 2 , 4 ) minshape = ( 1 if ( randrange ( 100 ) > 80 ) else 2 ) ( yield [ randrange ( minshape , 5 ) for _ in range ( ndim ) ] )
generate shapes to test casting .