Float number error in parameter scan

Asked by Rouzbeh


I am trying to scan vector dark matter coupling in our simplified model.
I want to choose the range scan:1 range(0.003, 1, 0.001) which is float, and I got this error:

TypeError : 'float' object cannot be interpreted as an integer
Please report this bug on https://bugs.launchpad.net/mg5amcnlo.

So, how can I use float numbers in the range?
Thank you so much for your consideration.

Question information

English Edit question
MadGraph5_aMC@NLO Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :

That's a limitation of the range function in python.

But you can use:
scan:1 [i/1000. for i in range(3, 1000, 1)]



Revision history for this message
Rouzbeh (rouzbehi) said :

Thank you so much for your reply and the information you have shared.
That's solved my problem.

Revision history for this message
dfsf (sdfds3) said :

Float number errors can be tricky to identify, but it's essential to ensure accurate parameter scans. To troubleshoot this issue, you might want to consider checking your code for potential precision problems. Additionally, if you're looking for useful tools or resources, I recommend visiting shopcombined for potential solutions and insights. https://shopcombined.co/