model.settings.particles is quite often set to be large numbers that >=1e6. This makes it very annoying and error prone to specify as ints, since python treats all scientific notation as a float.
I propose that:
model.settings.particles = 1e6 be allowed but
model.seetings.particles = 1.23e1 not be allowed as it not close to an integer value.
Alternatives
Teach users to use 10_000_000 notation. This isn't ideal as it relies on users being aware of certain features and not making mistakes.
Compatibility
This should have little impact on the user facing API, but will impact the test suite.
Description
model.settings.particles
is quite often set to be large numbers that>=1e6
. This makes it very annoying and error prone to specify as ints, since python treats all scientific notation as a float.I propose that:
model.settings.particles = 1e6
be allowed butmodel.seetings.particles = 1.23e1
not be allowed as it not close to an integer value.Alternatives
Teach users to use
10_000_000
notation. This isn't ideal as it relies on users being aware of certain features and not making mistakes.Compatibility
This should have little impact on the user facing API, but will impact the test suite.