When passing initial values on the command line (e.g. "Stock:1.1"), the full argument is parsed with the split_vars function, in the parser.py module.
However, the code in split_vars function looks like this:
if '=' in string:
# new variable value
var, value = string.split('=')
type = 'param'
if ':' in string:
# initial time value
var, value = string.split(':')
type = 'initial'
if value.strip().isnumeric():
# value is float
return {var.strip(): (type, float(value))}
The problem is that the isnumeric() method only returns True if it's a positive integer. For floats or negative values, it will return False.
I will add a fix for this in the new PR. This Issue is just to keep track of things that were fixed.
When passing initial values on the command line (e.g. "Stock:1.1"), the full argument is parsed with the split_vars function, in the parser.py module.
However, the code in split_vars function looks like this:
The problem is that the isnumeric() method only returns True if it's a positive integer. For floats or negative values, it will return False.
I will add a fix for this in the new PR. This Issue is just to keep track of things that were fixed.