This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author PingHGao
Recipients PingHGao
Date 2021-04-28.12:44:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619613855.19.0.40133405442.issue43966@roundup.psfhosted.org>
In-reply-to
Content
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!
History
Date User Action Args
2021-04-28 12:44:15PingHGaosetrecipients: + PingHGao
2021-04-28 12:44:15PingHGaosetmessageid: <1619613855.19.0.40133405442.issue43966@roundup.psfhosted.org>
2021-04-28 12:44:15PingHGaolinkissue43966 messages
2021-04-28 12:44:14PingHGaocreate