Float number error in parameter scan

Asked by Rouzbeh

Hello,

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

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Rouzbeh
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

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)]

Cheers,

Olivier

Revision history for this message
Rouzbeh (rouzbehi) said :
#2

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 :
#4

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/