问题
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