A silly question, but how do you exit this loop ? > while True: > u,p = mannwhitneyu(x,y) Unless you omitted some important part of your script, this loop will keep on running.