fix type errors under Windows: in nm.take() cells -> nm.int32(cells)