Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix Feldman-Cousins examples #2128
I noticed that the Feldman-Cousins examples stopped working with a newer installation of Python. The reason is that multiprocessing now needs the code to be enclosed by "if name == 'main':", otherwise it will lock up and never finish.
I also added back the astropy ProgressBar.
Thanks, @dlennarz! I just checked and the current examples just work fine for me in Python 3.7 and the Gammapy 0.11 environment. It would be nice if you could give some more info which error you see. For this it would be also helpful to have the output of the
However the changes look good to me and could be merged once we understood, why you see an error...
Hi @adonath, Upon closer investigation, it turns out that the problem was not a newer installation of Python, but running the code from Windows. For details see here:
The important part is this one:
I had originally developed this code under Linux and hence never noticed that it wouldn't run under Windows.