use static arrays for graph generation, use ctype cast to get numpy arrays