function * generate (a, b) {yield a; yield b;} for (let x of generate) // TypeError: generate is not iterable console. I thought that player is a tuple, and x, y are integers unpacked from this tuple, so no clue about where float comes in the picture. Thanks for contributing an answer to Stack Overflow! Any explanation would be highly appreciated! Whereas it is present in the list object. I checked it online and found that it is a classic problem. TypeError: 'float' object is not iterable. Generators are functions you call to produce an iterable object. We are going to explore the different ways of checking whether an object is iterable or not. Nan values can often cause errors (more specifically TypeErrors ) that will involve their type ‘ float ’. Note for the TypeError: ‘numpy.float64’ object is not iterable. min() requires an iterable as its argument. Thus float is not an iterable object and a list is an iterable object. Please be sure to answer the question.Provide details and share your research! Asking for help, clarification, or responding to other answers. It appears that df["ema_30"][i] is a float. I understand that there is something going wrong at line 38, with x and y, but I am nut sure how to tackle the float problem. The official dedicated python forum. Codecademy is the easiest way to learn how to code. The python error TypeError: argument of type ‘float’ is not iterable occurs when the membership operators check a value in a float variable. The presence of the magic method __iter__ is what makes an object iterable. Checking an object’s iterability. From the above article, we can conclude that the __iter__ method is absent in the float object. TypeError: numpy.float64 object is not iterable problem lies in I encountered a problem some time ago, and there was a problem of numpy.float64 object is not iterable in the for loop. TypeError: ‘float’ object is not iterable While NoneType errors are quite clear, errors caused by nan values can be a little confusing. TypeError: 'int' object is not iterable However, an int object is not iterable and so is a float object.The integer object number is not iterable, as we are not able to loop over it.. Output. log (x); When they are not called, the Function object corresponding to the generator is callable, but not iterable. TypeError: ("'NoneType' object is not iterable", u'occurred at index 2.2') Is this a bug or a feature? I don't see anything about that in the v0.13.0.txt , and it worked in 0.12: But avoid …. It's interactive, fun, and you can do it with your friends.