Return (a % i), that is pre-Python 2.6 string formatting (interpolation), element-wise for a pair of array_likes of str or unicode. Parameters ---------- a : array_like of str or unicode values : array_like of values These values will be element-wise interpolate
(a, values)
| 393 | |
| 394 | @array_function_dispatch(_mod_dispatcher) |
| 395 | def mod(a, values): |
| 396 | """ |
| 397 | Return (a % i), that is pre-Python 2.6 string formatting |
| 398 | (interpolation), element-wise for a pair of array_likes of str |
| 399 | or unicode. |
| 400 | |
| 401 | Parameters |
| 402 | ---------- |
| 403 | a : array_like of str or unicode |
| 404 | |
| 405 | values : array_like of values |
| 406 | These values will be element-wise interpolated into the string. |
| 407 | |
| 408 | Returns |
| 409 | ------- |
| 410 | out : ndarray |
| 411 | Output array of str or unicode, depending on input types |
| 412 | |
| 413 | See Also |
| 414 | -------- |
| 415 | str.__mod__ |
| 416 | |
| 417 | """ |
| 418 | return _to_bytes_or_str_array( |
| 419 | _vec_string(a, object_, '__mod__', (values,)), a) |
| 420 | |
| 421 | |
| 422 | @array_function_dispatch(_unary_op_dispatcher) |