BUG: fix buffer dtype mismatch on win-amd64

ValueError: Buffer dtype mismatch, expected 'Py_ssize_t' but got 'long'