Array
typedef struct {
T* data; // contiguous memory block
int64_t size;
int8 is_null; // boolean values in omniscidb are represented as int8 variables
} Array;Creating an Array programmatically
from numba import types as nb_types
from rbc.omnisci_backend import Array
@omnisci('double[](int64)')
def create_array(size):
array = Array(size, nb_types.double)
for i in range(size):
array[i] = nb_types.double(i)
return arrayfrom numba import types as nb_types
import rbc.omnisci_backend as omni
@omnisci('double[](int64)')
def zero_array(size):
return omni.zeros(size, nb_types.double)Accessing a pointer member
Getting the size of an array
Checking for null
Last updated
Was this helpful?