MCPcopy
hub / github.com/pydata/xarray / __mod__

Method __mod__

xarray/core/accessor_str.py:311–322  ·  view source on GitHub ↗
(
        self,
        other: Any,
    )

Source from the content-addressed store, hash-verified

309 return self.repeat(num)
310
311 def __mod__(
312 self,
313 other: Any,
314 ) -> T_DataArray:
315 if isinstance(other, dict):
316 other = {key: self._stringify(val) for key, val in other.items()}
317 return self._apply(func=lambda x: x % other)
318 elif isinstance(other, tuple):
319 other = tuple(self._stringify(x) for x in other)
320 return self._apply(func=lambda x, *y: x % y, func_args=other)
321 else:
322 return self._apply(func=lambda x, y: x % y, func_args=(other,))
323
324 def get(
325 self,

Callers

nothing calls this directly

Calls 3

_stringifyMethod · 0.95
_applyMethod · 0.95
itemsMethod · 0.80

Tested by

no test coverage detected