You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
value_string = "-1.1729285959021311e-05 W"
unit = value_string.lstrip("0123456789.- ")
unit
'e-05 W'
unit = value_string.lstrip("0123456789eE.- ")
unit
'W'
PyBaMM Version
24.9.0
Python Version
python 3.10
Describe the bug
in https://github.com/pybamm-team/PyBaMM/blob/develop/src/pybamm/experiment/step/base_step.py function def _convert_electric(value_string), if the value_string float value contains 'e' or 'E', the units incorrect parsed:
Python 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
for python3, according to https://docs.python.org/3/library/functions.html#float, should accept 'e' or 'E' as well
Steps to Reproduce
get incorrect unit 'e-05 W', it should be 'W'
Relevant log output
The text was updated successfully, but these errors were encountered: