Skip to content

Commit 29ffef6

Browse files
committed
Address comments
1 parent 514256a commit 29ffef6

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,9 +2003,9 @@ def _array_perimeter(arr):
20032003

20042004

20052005
def _unfold(arr, axis, size, step):
2006-
"""Append an extra dimension containing sliding windows along ``axis``.
2006+
"""Append an extra dimension containing sliding windows along **axis**.
20072007
2008-
All windows are of size ``size`` and begin with every ``step`` elements.
2008+
All windows are of size **size** and begin with every **step** elements.
20092009
20102010
Parameters
20112011
----------
@@ -2027,10 +2027,19 @@ def _unfold(arr, axis, size, step):
20272027

20282028

20292029
def _array_patch_perimeters(x, rstride, cstride):
2030-
"""Extract perimeters of patches from ``arr``.
2030+
"""Extract perimeters of patches from **arr**.
20312031
2032-
Extracted patches are of size ``(rstride + 1) x (cstride + 1)`` and share
2032+
Extracted patches are of size (**rstride** + 1) x (**cstride** + 1) and share
20332033
perimeters with their neighbors.
2034+
2035+
Parameters
2036+
----------
2037+
arr : ndarray, shape (N, M)
2038+
2039+
Returns
2040+
-------
2041+
patches : ndarray, shape (N / rstride * M / cstride,
2042+
2 * (**rstride** + **cstride**))
20342043
"""
20352044
assert rstride > 0 and cstride > 0
20362045
assert (x.shape[0] - 1) % rstride == 0

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,10 +1562,10 @@ def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
15621562
if (rows - 1) % rstride == 0 and \
15631563
(cols - 1) % cstride == 0 and \
15641564
fcolors is None:
1565-
polys = np.stack([cbook._array_patch_perimeters(a, rstride,
1566-
cstride)
1567-
for a in (X, Y, Z)],
1568-
axis=-1)
1565+
polys = np.stack(
1566+
[cbook._array_patch_perimeters(a, rstride, cstride)
1567+
for a in (X, Y, Z)],
1568+
axis=-1)
15691569
else:
15701570
# evenly spaced, and including both endpoints
15711571
row_inds = list(range(0, rows-1, rstride)) + [rows-1]

0 commit comments

Comments
 (0)