1 /* Copyright 2002 by Jeffrey Chang. All rights reserved.
2 * This code is part of the Biopython distribution and governed by its
3 * license. Please see the LICENSE file that should have been included
4 * as part of this package.
7 * Created 27 January 2002
9 * Miscellaneous useful C functions not to be exported as a python
17 /* Return a PyNumber as a double.
18 * Raises a TypeError if I can't do it.
20 double PyNumber_AsDouble(PyObject *py_num)
25 if((floatobj = PyNumber_Float(py_num)) == NULL)
27 val = PyFloat_AsDouble(floatobj);