Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit73985d9

Browse files
authored
Merge pull request#26544 from QuLogic/auto-backport-of-pr-26532-on-v3.7.x
Backport PR#26532: Fix input check in Poly3DCollection.__init__
2 parents2679b8e +4a1ef78 commit73985d9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

‎lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ def __init__(self, verts, *args, zsort='average', shade=False,
880880
kwargs['edgecolors']=_shade_colors(
881881
edgecolors,normals,lightsource
882882
)
883-
iffacecolorsisNoneandedgecolorsinNone:
883+
iffacecolorsisNoneandedgecolorsisNone:
884884
raiseValueError(
885885
"You must provide facecolors, edgecolors, or both for "
886886
"shade to work.")

‎lib/mpl_toolkits/mplot3d/tests/test_axes3d.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,3 +2176,13 @@ def test_mutating_input_arrays_y_and_z(fig_test, fig_ref):
21762176
y= [0.0,0.0,0.0]
21772177
z= [0.0,0.0,0.0]
21782178
ax2.plot(x,y,z,'o-')
2179+
2180+
2181+
deftest_Poly3DCollection_init_value_error():
2182+
# smoke test to ensure the input check works
2183+
# GH#26420
2184+
withpytest.raises(ValueError,
2185+
match='You must provide facecolors, edgecolors, '
2186+
'or both for shade to work.'):
2187+
poly=np.array([[0,0,1], [0,1,1], [0,0,0]],float)
2188+
c=art3d.Poly3DCollection([poly],shade=True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp