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.
1 parent 5dcab5e commit ca00ccaCopy full SHA for ca00cca
1 file changed
lib/matplotlib/tests/test_units.py
@@ -31,7 +31,10 @@ def __getattr__(self, attr):
31
return getattr(self.magnitude, attr)
32
33
def __getitem__(self, item):
34
- return Quantity(self.magnitude[item], self.units)
+ if iterable(self.magnitude):
35
+ return Quantity(self.magnitude[item], self.units)
36
+ else:
37
38
39
def __array__(self):
40
return np.asarray(self.magnitude)
0 commit comments