Closed zjb0807 closed 8 years ago
another problem, when i use PyFloat_AsDouble function: err: cannot use python.PyFloat_AsDouble(rate) (type float64) as type float32 in assignment
python.PyFloat_AsDouble
now returns a float64
.
either change the type of the value being assigned to (from float32
to float64
) or convert what python.PyFloat_AsDouble
returns to a float32
.
// PyObject* PyFloat_FromDouble(double v) // Return value: New reference. // Create a PyFloatObject object from v, or NULL on failure. func PyFloat_FromDouble(v float32) *PyObject { return togo(C.PyFloat_FromDouble(C.double(v))) }