I'm trying to use Tensorlow on İris dataset using sublime as the text editor. I got this error "TypeError: float() argument must be a string or a number, not 'generator'"when running the session, but I haven't any Idea about it. Please help me out. Attached is the error screenshot.

• try to do np.array(...).tolist() .. while generating your x1, x2 and y – Sandeep Bhutani Sep 17 '19 at 15:39

If you pull each of them out of the np.array calls and attempt to run them, you'll generate a nice SyntaxError (which is nice because it'll loudly tell us what's wrong!). Right now, the error is getting suppressed by the fact Python is taking that funky list comprehension and creating a generator expression (I'm guessing due to how Python manages argument packing).
rand_y = np.array([binary_target[y_i] for y_i in rand_index])