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

Skip to content

Commit 29e556a

Browse files
committed
Update lib/mpl_toolkits/mplot3d/axes3d.py
Make Axes3D.scatter properly deal with `zs` being of size 1.
1 parent a2fa253 commit 29e556a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c='b', *args, **kwargs):
19391939
raise ValueError("Arguments 'xs' and 'ys' must be of same size.")
19401940
if xs.size != zs.size:
19411941
if zs.size == 1:
1942-
zs = np.array(zs[0] * xs.size)
1942+
zs = np.tile(zs[0], xs.size)
19431943
else:
19441944
raise ValueError(("Argument 'zs' must be of same size as 'xs' "
19451945
"and 'ys' or of size 1."))

0 commit comments

Comments
 (0)