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

Commit 14d4808

Browse filesBrowse files
committed
TST: Use consistent float-to-str formatting.
1 parent 5a40d14 commit 14d4808
Copy full SHA for 14d4808

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎lib/matplotlib/testing/jpl_units/UnitDblFormatter.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/jpl_units/UnitDblFormatter.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def __call__( self, x, pos = None ):
3636
if len(self.locs) == 0:
3737
return ''
3838
else:
39-
return str(x)
39+
return '{:.12}'.format(x)
4040

4141
def format_data_short( self, value ):
4242
"Return the value formatted in 'short' format."
43-
return str(value)
43+
return '{:.12}'.format(value)
4444

4545
def format_data( self, value ):
4646
"Return the value formatted into a string."
47-
return str(value)
47+
return '{:.12}'.format(value)

0 commit comments

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