10000 c* files done · matplotlib/matplotlib@8fbb652 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fbb652

Browse files
committed
c* files done
1 parent aba9d99 commit 8fbb652

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/matplotlib/contour.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -857,10 +857,12 @@ def __init__(self, ax, *args, **kwargs):
857857
else:
858858
self.logscale = False
859859

860-
if self.origin is not None:
861-
assert(self.origin in ['lower', 'upper', 'image'])
862-
if self.extent is not None:
863-
assert(len(self.extent) == 4)
860+
if self.origin not in [None, 'lower', 'upper', 'image']:
861+
raise ValueError("If given, *origin* must be one of ['lower', \
862+
'upper', 'image']")
863+
if self.extent is not None and len(self.extent) != 4:
864+
raise ValueError("If give, *extent* must be '[ *None* | \
865+
(x0,x1,y0,y1) ]'")
864866
if self.colors is not None and cmap is not None:
865867
raise ValueError('Either colors or cmap must be None')
866868
if self.origin == 'image':

0 commit comments

Comments
 (0)
0