예제 #1
0
 def f(i):
     step = NonConstant(3)
     ar = SingleDimArray(step*i, dtype=float64_dtype)
     ar2 = SingleDimArray(i, dtype=float64_dtype)
     ar2.get_concrete().setitem(1, float64_dtype.box(5.5))
     arg = ar2.descr_add(space, ar2)
     ar.setslice(space, 0, step*i, step, i, arg)
     return ar.get_concrete().eval(3).val
예제 #2
0
 def f(i):
     step = NonConstant(3)
     ar = SingleDimArray(step*i)
     ar2 = SingleDimArray(i)
     ar2.storage[1] = 5.5
     if NonConstant(False):
         arg = ar2
     else:
         arg = ar2.descr_add(space, ar2)
     ar.setslice(space, 0, step*i, step, i, arg)
     return ar.get_concrete().storage[3]