Fix ValueError: Buffer dtype mismatch, expected 'INTP' but got 'long' on win-amd64