我试图写一个程序,要求闪电和雷电之间的秒数,并报告距离风暴四舍五入到小数点两位。number of seconds between lightning and storm') print('Distance from storm',n/5)
TypeError: unsupported operand type(s) for
我正在为Python开发一个C扩展,它实现了将numpy元素列表(在本例中为numpy.uint64)转换为unsigned long long C-类型(使用PyLong_AsUnsignedLongLong然后对列表中的元素进行求和,并将结果和返回到Python层。为了创建模块,我用testmodule.c编写了这段代码
static PyObject *method_sum_list_u64(PyObject