numpy.core.defchararray.upper()

numpy.core.defchararray.upper(a) [source] Return an array with the elements converted to uppercase. Calls str.upper element-wise. For 8-bit strings, this method is locale-dependent. Parameters: a : array_like, {str, unicode} Input array. Returns: out : ndarray, {str, unicode} Output array of str or unicode, depending on input type See also str.upper Examples >>> c = np.array(['a1b c', '1bca', 'bca1']); c array(['a1b c', '1bca', 'bca1'], dtype='|S5') >>> np.ch

numpy.core.defchararray.translate()

numpy.core.defchararray.translate(a, table, deletechars=None) [source] For each element in a, return a copy of the string where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped through the given translation table. Calls str.translate element-wise. Parameters: a : array-like of str or unicode table : str of length 256 deletechars : str Returns: out : ndarray Output array of str or unicode, depending on input type

numpy.core.defchararray.title()

numpy.core.defchararray.title(a) [source] Return element-wise title cased version of string or unicode. Title case words start with uppercase characters, all remaining cased characters are lowercase. Calls str.title element-wise. For 8-bit strings, this method is locale-dependent. Parameters: a : array_like, {str, unicode} Input array. Returns: out : ndarray Output array of str or unicode, depending on input type See also str.title Examples >>> c=np.array(['a1b c','1b ca'

numpy.core.defchararray.swapcase()

numpy.core.defchararray.swapcase(a) [source] Return element-wise a copy of the string with uppercase characters converted to lowercase and vice versa. Calls str.swapcase element-wise. For 8-bit strings, this method is locale-dependent. Parameters: a : array_like, {str, unicode} Input array. Returns: out : ndarray, {str, unicode} Output array of str or unicode, depending on input type See also str.swapcase Examples >>> c=np.array(['a1B c','1b Ca','b Ca1','cA1b'],'S5'); c a

numpy.core.defchararray.strip()

numpy.core.defchararray.strip(a, chars=None) [source] For each element in a, return a copy with the leading and trailing characters removed. Calls str.rstrip element-wise. Parameters: a : array-like of str or unicode chars : str or unicode, optional The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. The chars argument is not a prefix or suffix; rather, all combinations of its values are str

numpy.core.defchararray.startswith()

numpy.core.defchararray.startswith(a, prefix, start=0, end=None) [source] Returns a boolean array which is True where the string element in a starts with prefix, otherwise False. Calls str.startswith element-wise. Parameters: a : array_like of str or unicode prefix : str start, end : int, optional With optional start, test beginning at that position. With optional end, stop comparing at that position. Returns: out : ndarray Array of booleans See also str.startswith

numpy.core.defchararray.splitlines()

numpy.core.defchararray.splitlines(a, keepends=None) [source] 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 list unless keepends is given and true. Returns: out : ndarray Array of list objects See also str.splitlines

numpy.core.defchararray.split()

numpy.core.defchararray.split(a, sep=None, maxsplit=None) [source] For each element in a, return a list of the words in the string, using sep as the delimiter string. Calls str.rsplit element-wise. Parameters: a : array_like of str or unicode sep : str or unicode, optional If sep is not specified or None, any whitespace string is a separator. maxsplit : int, optional If maxsplit is given, at most maxsplit splits are done. Returns: out : ndarray Array of list objects See also str.

numpy.core.defchararray.rstrip()

numpy.core.defchararray.rstrip(a, chars=None) [source] For each element in a, return a copy with the trailing characters removed. Calls str.rstrip element-wise. Parameters: a : array-like of str or unicode chars : str or unicode, optional The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. The chars argument is not a suffix; rather, all combinations of its values are stripped. Returns: ou

numpy.core.defchararray.rsplit()

numpy.core.defchararray.rsplit(a, sep=None, maxsplit=None) [source] For each element in a, return a list of the words in the string, using sep as the delimiter string. Calls str.rsplit element-wise. Except for splitting from the right, rsplit behaves like split. Parameters: a : array_like of str or unicode sep : str or unicode, optional If sep is not specified or None, any whitespace string is a separator. maxsplit : int, optional If maxsplit is given, at most maxsplit splits are done,