Fixing no return function for numpy.nextafter

别说谁变了你拦得住时间么 提交于 2021-02-10 18:48:39

问题


I'm trying to find the next floating point value after a towards a + 1. My code basically looks like this:

if a == 0:
    a = numpy.nextafter(a,a+1)

I expect to get a new a that's the next floating point value, as stated above, but all I get is "Assigning result of a function call, where the function has no return (assignment-from-no-return)". I've double checked my versions of NumPy and Python, and cannot figure out what's wrong.

来源:https://stackoverflow.com/questions/54548783/fixing-no-return-function-for-numpy-nextafter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!