Fix type uncompatability on Windows, convert ndarray.shape to Int