(self, item)
| 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) |