Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 077005f

Browse files
Fix deprecation warning
1 parent b02182c commit 077005f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,11 @@ def do_3d_projection(self):
575575

576576
# FIXME
577577
if len(xyzs) > 0:
578-
minz = min(np.min(xyzs[..., 2][~mask]), 1e9)
578+
zs = xyzs[..., 2]
579+
if mask is False:
580+
minz = min(np.min(zs), 1e9)
581+
else:
582+
minz = min(np.min(zs[~mask[..., 0]]), 1e9)
579583
else:
580584
minz = np.nan
581585
return minz
@@ -660,6 +664,8 @@ def do_3d_projection(self):
660664
self.axes.M,
661665
self.axes._focal_length)
662666
self._path2d = mpath.Path(np.column_stack([vxs, vys]))
667+
if mask is False:
668+
return np.min(vzs)
663669
return np.min(vzs[~mask])
664670

665671

@@ -727,6 +733,8 @@ def do_3d_projection(self):
727733
self.axes._focal_length)
728734
self._path2d = mpath.Path(np.column_stack([vxs, vys]), self._code3d)
729735

736+
if mask is False:
737+
return np.min(vzs)
730738
return np.min(vzs[~mask])
731739

732740

@@ -880,6 +888,8 @@ def do_3d_projection(self):
880888
super().set_offsets(np.column_stack([vxs, vys]))
881889

882890
if vzs.size > 0:
891+
if mask is False:
892+
return np.min(vzs)
883893
return np.min(vzs[~mask])
884894
else:
885895
return np.nan

0 commit comments

Comments
 (0)