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.

Title: F String bugs with numpy.float32
Type: behavior Stage: resolved
Components: Versions: Python 3.8
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: PingHGao, mark.dickinson
Priority: normal Keywords:

Created on 2021-04-28 12:44 by PingHGao, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg392192 - (view) Author: GPH (PingHGao) Date: 2021-04-28 12:44
When using F String with numpy.float32 variable, the output is wrong!

Example code:

import numpy as np

floatNumber = 0.00123

npFloatNumber = np.float32(0.00123)

The output is:


As we can see, the value of np.float32 is wrong!
msg392193 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2021-04-28 12:56
See I'll close here (this tracker is for core Python, and NumPy isn't part of core Python).
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88132
2021-04-28 12:56:02mark.dickinsonsetstatus: open -> closed

nosy: + mark.dickinson
messages: + msg392193

resolution: third party
stage: resolved
2021-04-28 12:44:15PingHGaocreate