We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dba02be commit e66cd0fCopy full SHA for e66cd0f
lib/mpl_toolkits/mplot3d/art3d.py
@@ -8,6 +8,7 @@
8
"""
9
10
import math
11
+import sys
12
13
import numpy as np
14
@@ -733,7 +734,13 @@ def set_zsort(self, zsort):
733
734
The function applied on the z-coordinates of the vertices in the
735
viewer's coordinate system, to determine the z-order.
736
- self._zsortfunc = self._zsort_functions[zsort]
737
+ def nansafe(func):
738
+ def f(x):
739
+ value = func(x)
740
+ return sys.maxsize if np.isnan(value) else value
741
+ return f
742
+
743
+ self._zsortfunc = nansafe(self._zsort_functions[zsort])
744
self._sort_zpos = None
745
self.stale = True
746
0 commit comments