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

Commitc44ae00

Browse files
authored
Merge pull request#30153 from emmanuel-ferdman/main
Throw exception when alpha is out of bounds
2 parents5f922ff +0ee8e81 commitc44ae00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ def with_alpha(self, alpha):
949949
ifnotisinstance(alpha,Real):
950950
raiseTypeError(f"'alpha' must be numeric or None, not{type(alpha)}")
951951
ifnot0<=alpha<=1:
952-
ValueError("'alpha' must be between 0 and 1, inclusive")
952+
raiseValueError("'alpha' must be between 0 and 1, inclusive")
953953
new_cm=self.copy()
954954
ifnotnew_cm._isinit:
955955
new_cm._init()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp