Пример #1
0
 def query(self, x):
     idx = rs.get_int_pp()
     res = rs.get_int_p()
     self.simple_index_areatime.query(x.data(), x.size(), idx, res)
     n = rs.get_int(res)
     a = intpp2array(idx, n)
     return a
Пример #2
0
 def query(self, x):
     idx = rs.get_int_pp()
     #print('t1', idx)
     res = rs.get_int_p()
     #print('t2', res)
     self.simple_index_areatime.query(x.data(), x.size(), idx, res)
     #print('t3')
     n = rs.get_int(res)
     #print('t4', n)
     a = intpp2array(idx, n)
     #print('t5')
     return a
Пример #3
0
def intpp2array(pp, n):
    p = rs.get_int_p(pp)
    a = np.empty(n, dtype=np.int32)
    rs.memcpy(rs.swig_ptr(a), p, a.nbytes)
    return a