(self, f: Callable, *args, **kwargs)
| 4886 | return computation.dot(other, self) |
| 4887 | |
| 4888 | def _unary_op(self, f: Callable, *args, **kwargs) -> Self: |
| 4889 | keep_attrs = kwargs.pop("keep_attrs", None) |
| 4890 | if keep_attrs is None: |
| 4891 | keep_attrs = _get_keep_attrs(default=True) |
| 4892 | with warnings.catch_warnings(): |
| 4893 | warnings.filterwarnings("ignore", r"All-NaN (slice|axis) encountered") |
| 4894 | warnings.filterwarnings( |
| 4895 | "ignore", r"Mean of empty slice", category=RuntimeWarning |
| 4896 | ) |
| 4897 | with np.errstate(all="ignore"): |
| 4898 | da = self.__array_wrap__(f(self.variable.data, *args, **kwargs)) |
| 4899 | if keep_attrs: |
| 4900 | da.attrs = self.attrs |
| 4901 | return da |
| 4902 | |
| 4903 | def _binary_op( |
| 4904 | self, other: DaCompatible, f: Callable, reflexive: bool = False |
nothing calls this directly
no test coverage detected