Example #1
0
 def copy_int(self, array_in, offset=0):
   """
   Copies @array_in into the C array and returns it.
   Setting @offset will add it to the value of the array
   """
   array_out = mu.new_iarr(len(array_in))
   try:
     for i in xrange(len(array_in)):
       mu.iarr_setitem(array_out, i, np.int(array_in[i]+offset))
   except Exception:
     #@TODO:put here some stuffs!
     pass
   else:
     return array_out
Example #2
0
 def set_int(self, array_out, array_in, offset=0):
     array_out = mu.new_iarr(len(array_in))
     mu.set_array_int(array_out, array_in, offset)
     return array_out