[New-bugs-announce] [issue43966] F String bugs with numpy.float32
GPH
report at bugs.python.org
Wed Apr 28 08:44:15 EDT 2021
New submission from GPH <gphsmail at 163.com>:
When using F String with numpy.float32 variable, the output is wrong!
Example code:
```python
import numpy as np
floatNumber = 0.00123
print(f"num:{floatNumber}")
npFloatNumber = np.float32(0.00123)
print(f"num:{npFloatNumber}")
```
The output is:
```
num:0.00123
num:0.001230000052601099
```
As we can see, the value of np.float32 is wrong!
----------
messages: 392192
nosy: PingHGao
priority: normal
severity: normal
status: open
title: F String bugs with numpy.float32
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43966>
_______________________________________
More information about the New-bugs-announce
mailing list