MCPcopy Create free account
hub / github.com/numpy/numpy / splitlines

Function splitlines

numpy/core/defchararray.py:1548–1574  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1546
1547@array_function_dispatch(_splitlines_dispatcher)
1548def 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
1577def _startswith_dispatcher(a, prefix, start=None, end=None):

Callers 1

splitlinesMethod · 0.85

Calls 2

_vec_stringFunction · 0.90
_clean_argsFunction · 0.85

Tested by

no test coverage detected