use npy_intp for sizes