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

Appearance settings

Commit ba1e339

Browse filesBrowse files
committed
Only try to extend rii and cii when not empty
1 parent 994f167 commit ba1e339
Copy full SHA for ba1e339

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,19 +1750,19 @@ def plot_wireframe(self, X, Y, Z, *args, **kwargs):
17501750

17511751
if rstride:
17521752
rii = list(xrange(0, rows, rstride))
1753+
# Add the last index only if needed
1754+
if rows > 0 and rii[-1] != (rows - 1) :
1755+
rii += [rows-1]
17531756
else:
17541757
rii = []
1755-
if cstride:
1758+
if cstride:
17561759
cii = list(xrange(0, cols, cstride))
1760+
# Add the last index only if needed
1761+
if cols > 0 and cii[-1] != (cols - 1) :
1762+
cii += [cols-1]
17571763
else:
17581764
cii = []
17591765

1760-
# Add the last index only if needed
1761-
if rows > 0 and rii[-1] != (rows - 1) :
1762-
rii += [rows-1]
1763-
if cols > 0 and cii[-1] != (cols - 1) :
1764-
cii += [cols-1]
1765-
17661766
# If the inputs were empty, then just
17671767
# reset everything.
17681768
if Z.size == 0 :

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.