Thanks to visit codestin.com Credit goes to github.com
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.
2 parents a247d93 + cee4ba9 commit 21fd7c0Copy full SHA for 21fd7c0
1 file changed
lib/matplotlib/units.py
@@ -149,7 +149,13 @@ def get_converter(self, x):
149
return converter
150
except AttributeError:
151
# not a masked_array
152
- converter = self.get_converter(xravel[0])
+ # Make sure we don't recurse forever -- it's possible for
153
+ # ndarray subclasses to continue to return subclasses and
154
+ # not ever return a non-subclass for a single element.
155
+ next_item = xravel[0]
156
+ if (not isinstance(next_item, np.ndarray) or
157
+ next_item.shape != x.shape):
158
+ converter = self.get_converter(next_item)
159
160
161
if converter is None and iterable(x):
0 commit comments