For each element in `a`, return a list of the lines in the element, breaking at line boundaries. Calls `str.splitlines` element-wise. Parameters ---------- a : array_like of str or unicode keepends : bool, optional Line breaks are not included in the resulting
(a, keepends=None)
| 1546 | |
| 1547 | @array_function_dispatch(_splitlines_dispatcher) |
| 1548 | def splitlines(a, keepends=None): |
| 1549 | """ |
| 1550 | For each element in `a`, return a list of the lines in the |
| 1551 | element, breaking at line boundaries. |
| 1552 | |
| 1553 | Calls `str.splitlines` element-wise. |
| 1554 | |
| 1555 | Parameters |
| 1556 | ---------- |
| 1557 | a : array_like of str or unicode |
| 1558 | |
| 1559 | keepends : bool, optional |
| 1560 | Line breaks are not included in the resulting list unless |
| 1561 | keepends is given and true. |
| 1562 | |
| 1563 | Returns |
| 1564 | ------- |
| 1565 | out : ndarray |
| 1566 | Array of list objects |
| 1567 | |
| 1568 | See Also |
| 1569 | -------- |
| 1570 | str.splitlines |
| 1571 | |
| 1572 | """ |
| 1573 | return _vec_string( |
| 1574 | a, object_, 'splitlines', _clean_args(keepends)) |
| 1575 | |
| 1576 | |
| 1577 | def _startswith_dispatcher(a, prefix, start=None, end=None): |
no test coverage detected