Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d017bd

Browse files
committed
Move default format dict inside method
1 parent 8c50f39 commit 1d017bd

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

lib/matplotlib/mlab.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,21 +3097,19 @@ def fromstr(self, x):
30973097
return dateutil.parser.parse(x)
30983098

30993099

3100-
defaultformatd = {
3101-
np.bool_: FormatBool(),
3102-
np.int16: FormatInt(),
3103-
np.int32: FormatInt(),
3104-
np.int64: FormatInt(),
3105-
np.float32: FormatFloat(),
3106-
np.float64: FormatFloat(),
3107-
np.object_: FormatObj(),
3108-
np.string_: FormatString(),
3109-
}
3110-
3111-
31123100
@cbook.deprecated("2.2")
31133101
def get_formatd(r, formatd=None):
31143102
'build a formatd guaranteed to have a key for every dtype name'
3103+
defaultformatd = {
3104+
np.bool_: FormatBool(),
3105+
np.int16: FormatInt(),
3106+
np.int32: FormatInt(),
3107+
np.int64: FormatInt(),
3108+
np.float32: FormatFloat(),
3109+
np.float64: FormatFloat(),
3110+
np.object_: FormatObj(),
3111+
np.string_: FormatString()}
3112+
31153113
if formatd is None:
31163114
formatd = dict()
31173115

@@ -3328,8 +3326,8 @@ def newfunc(val, mask, mval):
33283326

33293327
@cbook.deprecated('2.2')
33303328
def griddata(x, y, z, xi, yi, interp='nn'):
3331-
"""Interpolates from a nonuniformly spaced grid to some other
3332-
grid.
3329+
"""
3330+
Interpolates from a nonuniformly spaced grid to some other grid.
33333331
33343332
Fits a surface of the form z = f(`x`, `y`) to the data in the
33353333
(usually) nonuniformly spaced vectors (`x`, `y`, `z`), then

0 commit comments

Comments
 (0)