@@ -602,15 +602,15 @@ def set_xlim3d(self, left=None, right=None, emit=True, auto=False, **kw):
602
602
if right is None and cbook .iterable (left ):
603
603
left , right = left
604
604
605
- if ((np .isscalar (left )) and not (np .isfinite (left ))) \
606
- or ((np .isscalar (right )) and (not np .isfinite (right ))):
607
- raise ValueError ('left/right should be finite values' )
608
-
609
605
self ._process_unit_info (xdata = (left , right ))
610
606
if left is not None :
611
607
left = self .convert_xunits (left )
608
+ if ((np .isscalar (left )) and not (np .isfinite (left ))):
609
+ raise ValueError ('left/right should be finite values' )
612
610
if right is not None :
613
611
right = self .convert_xunits (right )
612
+ if ((np .isscalar (right )) and (not np .isfinite (right ))):
613
+ raise ValueError ('left/right should be finite values' )
614
614
615
615
old_left , old_right = self .get_xlim ()
616
616
if left is None :
@@ -660,15 +660,15 @@ def set_ylim3d(self, bottom=None, top=None, emit=True, auto=False, **kw):
660
660
if top is None and cbook .iterable (bottom ):
661
661
bottom , top = bottom
662
662
663
- if ((np .isscalar (top )) and not (np .isfinite (top ))) \
664
- or ((np .isscalar (bottom )) and (not np .isfinite (bottom ))):
665
- raise ValueError ('top/bottom should be finite values' )
666
-
667
663
self ._process_unit_info (ydata = (bottom , top ))
668
664
if bottom is not None :
669
665
bottom = self .convert_yunits (bottom )
666
+ if ((np .isscalar (bottom )) and not (np .isfinite (bottom ))):
667
+ raise ValueError ('bottom should be finite values' )
670
668
if top is not None :
671
669
top = self .convert_yunits (top )
670
+ if ((np .isscalar (top )) and (not np .isfinite (top ))):
671
+ raise ValueError ('top should be finite values' )
672
672
673
673
old_bottom , old_top = self .get_ylim ()
674
674
if bottom is None :
@@ -720,14 +720,14 @@ def set_zlim3d(self, bottom=None, top=None, emit=True, auto=False, **kw):
720
720
721
721
self ._process_unit_info (zdata = (bottom , top ))
722
722
723
- if ((np .isscalar (top )) and not (np .isfinite (top ))) \
724
- or ((np .isscalar (bottom )) and (not np .isfinite (bottom ))):
725
- raise ValueError ('top/bottom should be finite values' )
726
-
727
723
if bottom is not None :
728
724
bottom = self .convert_zunits (bottom )
725
+ if ((np .isscalar (bottom )) and not (np .isfinite (bottom ))):
726
+ raise ValueError ('bottom should be finite values' )
729
727
if top is not None :
730
728
top = self .convert_zunits (top )
729
+ if ((np .isscalar (top )) and (not np .isfinite (top ))):
730
+ raise ValueError ('top should be finite values' )
731
731
732
732
old_bottom , old_top = self .get_zlim ()
733
733
if bottom is None :
0 commit comments