I am using genetic algorithm toolbox in Python. The code:
toolbox.register("attr_bool", random.randint, 0, 1) usually defines random numbers of 0 and 1 to be generated. The question is that I am looking for random numbers between 0 and 1. I used toolbox.register("attr_bool", random.uniform(0, 1)), but it takes me the below error:
TypeError: the first argument must be callable