MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __getitem__

Method __getitem__

lib/matplotlib/tests/test_image.py:1303–1308  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

1301 self.units = getattr(obj, "units", None)
1302
1303 def __getitem__(self, item):
1304 units = getattr(self, "units", None)
1305 ret = super().__getitem__(item)
1306 if isinstance(ret, QuantityND) or units is not None:
1307 ret = QuantityND(ret, units)
1308 return ret
1309
1310 def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
1311 func = getattr(ufunc, method)

Callers

nothing calls this directly

Calls 1

QuantityNDClass · 0.85

Tested by

no test coverage detected