Replace PyNumber_AsDouble by PyFloat_AsDouble, which does the same thing