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 0ee8e81

Browse filesBrowse files
Throw exception when alpha is out of bounds
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
1 parent 5f922ff commit 0ee8e81
Copy full SHA for 0ee8e81

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎lib/matplotlib/colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ def with_alpha(self, alpha):
949949
if not isinstance(alpha, Real):
950950
raise TypeError(f"'alpha' must be numeric or None, not {type(alpha)}")
951951
if not 0 <= alpha <= 1:
952-
ValueError("'alpha' must be between 0 and 1, inclusive")
952+
raise ValueError("'alpha' must be between 0 and 1, inclusive")
953953
new_cm = self.copy()
954954
if not new_cm._isinit:
955955
new_cm._init()

0 commit comments

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