Lines Matching refs:randrange

20 from random import randrange, sample, choice
158 x = randrange(*fmtdict[mode][char])
192 nmemb = randrange(2, 10) # number of struct members
494 ndim = randrange(maxdim+1)
499 nitems = randrange(1, 16+1)
501 offset = -itemsize if randrange(2) == 0 else memlen
505 n = randrange(100)
513 shape[i] = randrange(minshape, maxshape+1)
518 n = randrange(100)
522 strides[ndim-1] = itemsize * randrange(-maxstride, maxstride+1)
529 strides[i] = itemsize * randrange(-maxstride, maxstride+1)
531 strides[i] = ((1,-1)[randrange(2)] *
532 itemsize * randrange(1, maxstride+1))
547 offset = -imin-itemsize if randrange(2) == 0 else memlen
553 start = randrange(maxstart+1)
555 step = randrange(1, maxstep+1)
570 slicelen = randrange(1, l+1) if l > 0 else 0
579 ndim = randrange(1, maxdim+1)
581 n = randrange(100)
586 all_random = True if randrange(100) >= 80 else False
591 small = randrange(minshape, maxshape+1)
592 big = randrange(minshape, maxshape+1)
598 start = randrange(-small, small+1)
599 stop = randrange(-small, small+1)
600 step = (1,-1)[randrange(2)] * randrange(1, small+2)
604 slicelen = randrange(1, small+1) if small > 0 else 0
609 if randrange(2) == 0:
681 ndim = randrange(4, 6)
682 minshape = 1 if randrange(100) > 80 else 2
683 yield [randrange(minshape, 5) for _ in range(ndim)]
684 ndim = randrange(2, 4)
685 minshape = 1 if randrange(100) > 80 else 2
686 yield [randrange(minshape, 5) for _ in range(ndim)]
707 slicelen = randrange(minlen, n+1)
1312 nitems = randrange(1, 10)
1324 nitems = randrange(1, 30)
1351 shape_t = [randrange(2, 10) for _ in range(ndim)]
2580 sformat = '@' + sfmt if randrange(2) else sfmt
2583 dformat = '@' + dfmt if randrange(2) else dfmt
2761 tfmt = ('', '@')[randrange(2)] + char
2983 i = randrange(-3, 3)