FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Privatize cbook.format_approx. by QuLogic · Pull Request #18090 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion lib/matplotlib/cbook/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2385,7 +2385,7 @@ def _setup_new_guiapp():
"matplotlib")


def format_approx(number, precision):
def _format_approx(number, precision):
"""
Format the number with at most the number of decimals given as precision.
Remove trailing zeros and possibly the decimal point.
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/test_cbook.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def verify_pre_post_state(obj):


def test_format_approx():
f = cbook.format_approx
f = cbook._format_approx
assert f(0, 1) == '0'
assert f(0, 2) == '0'
assert f(0, 3) == '0'
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/type1font.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import numpy as np

from matplotlib.cbook import format_approx
from matplotlib.cbook import _format_approx


# token types
Expand Down Expand Up @@ -271,7 +271,7 @@ def fontmatrix(array):
array[::2] = newmatrix[0:3, 0]
array[1::2] = newmatrix[0:3, 1]
return (
'[%s]' % ' '.join(format_approx(x, 6) for x in array)
'[%s]' % ' '.join(_format_approx(x, 6) for x in array)
).encode('ascii')

def replace(fun):
Expand Down

Back | FazBrowse Home | New Git URL