Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitfecfa1a

Browse files
authored
Merge pull request#18090 from QuLogic/private-format_approx
Privatize cbook.format_approx.
2 parentsb5eca56 +019537f commitfecfa1a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎lib/matplotlib/cbook/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,7 @@ def _setup_new_guiapp():
23852385
"matplotlib")
23862386

23872387

2388-
defformat_approx(number,precision):
2388+
def_format_approx(number,precision):
23892389
"""
23902390
Format the number with at most the number of decimals given as precision.
23912391
Remove trailing zeros and possibly the decimal point.

‎lib/matplotlib/tests/test_cbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ def verify_pre_post_state(obj):
744744

745745

746746
deftest_format_approx():
747-
f=cbook.format_approx
747+
f=cbook._format_approx
748748
assertf(0,1)=='0'
749749
assertf(0,2)=='0'
750750
assertf(0,3)=='0'

‎lib/matplotlib/type1font.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
importnumpyasnp
3131

32-
frommatplotlib.cbookimportformat_approx
32+
frommatplotlib.cbookimport_format_approx
3333

3434

3535
# token types
@@ -271,7 +271,7 @@ def fontmatrix(array):
271271
array[::2]=newmatrix[0:3,0]
272272
array[1::2]=newmatrix[0:3,1]
273273
return (
274-
'[%s]'%' '.join(format_approx(x,6)forxinarray)
274+
'[%s]'%' '.join(_format_approx(x,6)forxinarray)
275275
).encode('ascii')
276276

277277
defreplace(fun):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp