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

Skip to content

Commit 0d9dec7

Browse files
committed
flake
1 parent 3b73e4f commit 0d9dec7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,8 @@ def pad_arrays(*v, padval=np.nan):
15341534

15351535
if len(set([k.shape[0] for k in v])) == 1:
15361536
return v
1537-
return np.array(list(itertools.zip_longest(*v, fillvalue=padval)), dtype=float).T
1537+
padded_v = list(itertools.zip_longest(*v, fillvalue=padval))
1538+
return np.array(padded_v, dtype=float).T
15381539

15391540

15401541
def pts_to_prestep(x, *args):
@@ -1603,7 +1604,7 @@ def pts_to_betweenstep(x, *args):
16031604
step_length = max(2 * max(len(x), len(args[0])) - 2, 0)
16041605
steps = np.zeros((1 + len(args), step_length))
16051606

1606-
def __between__(steps, sl0, sl1, _x, _args):
1607+
def __between__(steps, sl0, sl1, _x, _args):
16071608
# Be agnostic whether xlike or ylike
16081609
if _x.flatten().shape != x.shape:
16091610
if _x.flatten().shape[-1] == _x.shape[-1]:
@@ -1612,7 +1613,7 @@ def __between__(steps, sl0, sl1, _x, _args):
16121613
steps[sl0, 2::2] = _x[1:-1]
16131614
steps[sl0, 1:-1:2] = _x[1:-1]
16141615
steps[sl1, 0::2] = _args
1615-
steps[sl1, 1::2] = _args
1616+
steps[sl1, 1::2] = _args
16161617
return steps
16171618

16181619
if len(x) == len(args[0]) + 1:
@@ -1665,15 +1666,13 @@ def pts_to_betweenstep_edges(x, *args):
16651666
16661667
"""
16671668
steps = pts_to_betweenstep(x, *args)
1668-
print("XXX")
16691669
# Extra steps to plot edges where values are missing (Nan).
16701670
nan_cols = np.nonzero(np.isnan(np.sum(steps, axis=0)))[0]
16711671
nan_cols[1::2] = nan_cols[1::2]+1
16721672
pad_steps = []
16731673

16741674
xlike = len(x) == len(args[0]) + 1
16751675
ylike = len(x) + 1 == len(args[0])
1676-
print(x,args)
16771676
if not (xlike or ylike):
16781677
# Fall back to steps-post (legend drawing)
16791678
edge_steps = pts_to_poststep(x, *args)

0 commit comments

Comments
 (0)