Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inconsistent f-string output for rounded np.float32 #10645

Copy link
Copy link
Open
@davidmascharka

Description

@davidmascharka
Issue body actions

NumPy 1.13.3, Python 3.6.2, Ubuntu 16.04

>>> str(round(1337.09997559, 1))
'1337.1'

>>> f'{round(1337.09997559, 1)}'
'1337.1'

>>> f'{round(np.float32(1337.09997559), 1)}'
'1337.0999755859375'

>>> str(round(np.float32(1337.09997559), 1))
'1337.1'

>>> f'{round(np.float64(1337.09997559), 1)}'
'1337.1'

>>> str(round(np.float64(1337.09997559), 1))
'1337.1'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.