use typed numpy arrays