Convert a string-like to the correct string/bytes type. This is mostly here to tell mypy a pattern is a str/bytes not a re.Pattern.
(self, invar: Any)
| 210 | self._obj = obj |
| 211 | |
| 212 | def _stringify(self, invar: Any) -> str | bytes | Any: |
| 213 | """ |
| 214 | Convert a string-like to the correct string/bytes type. |
| 215 | |
| 216 | This is mostly here to tell mypy a pattern is a str/bytes not a re.Pattern. |
| 217 | """ |
| 218 | if hasattr(invar, "astype"): |
| 219 | return invar.astype(self._obj.dtype.kind) |
| 220 | else: |
| 221 | return self._obj.dtype.type(invar) |
| 222 | |
| 223 | def _apply( |
| 224 | self, |
no test coverage detected