numpy.core.defchararray.rpartition()

numpy.core.defchararray.rpartition(a, sep) [source] Partition (split) each element around the right-most separator. Calls str.rpartition element-wise. For each element in a, split the element as the last occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return 3 strings containing the string itself, followed by two empty strings. Parameters: a : array_like of str or unicod

numpy.core.defchararray.rjust()

numpy.core.defchararray.rjust(a, width, fillchar=' ') [source] Return an array with the elements of a right-justified in a string of length width. Calls str.rjust element-wise. Parameters: a : array_like of str or unicode width : int The length of the resulting strings fillchar : str or unicode, optional The character to use for padding Returns: out : ndarray Output array of str or unicode, depending on input type See also str.rjust

numpy.core.defchararray.rindex()

numpy.core.defchararray.rindex(a, sub, start=0, end=None) [source] Like rfind, but raises ValueError when the substring sub is not found. Calls str.rindex element-wise. Parameters: a : array-like of str or unicode sub : str or unicode start, end : int, optional Returns: out : ndarray Output array of ints. See also rfind, str.rindex

numpy.core.defchararray.rfind()

numpy.core.defchararray.rfind(a, sub, start=0, end=None) [source] For each element in a, return the highest index in the string where substring sub is found, such that sub is contained within [start, end]. Calls str.rfind element-wise. Parameters: a : array-like of str or unicode sub : str or unicode start, end : int, optional Optional arguments start and end are interpreted as in slice notation. Returns: out : ndarray Output array of ints. Return -1 on failure. See also str.rfind

numpy.core.defchararray.replace()

numpy.core.defchararray.replace(a, old, new, count=None) [source] For each element in a, return a copy of the string with all occurrences of substring old replaced by new. Calls str.replace element-wise. Parameters: a : array-like of str or unicode old, new : str or unicode count : int, optional If the optional argument count is given, only the first count occurrences are replaced. Returns: out : ndarray Output array of str or unicode, depending on input type See also str.replace

numpy.core.defchararray.partition()

numpy.core.defchararray.partition(a, sep) [source] Partition each element in a around sep. Calls str.partition element-wise. For each element in a, split the element as the first occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return 3 strings containing the string itself, followed by two empty strings. Parameters: a : array_like, {str, unicode} Input array sep : {str,

numpy.core.defchararray.not_equal()

numpy.core.defchararray.not_equal(x1, x2) [source] Return (x1 != x2) element-wise. Unlike numpy.not_equal, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters: x1, x2 : array_like of str or unicode Input arrays of the same shape. Returns: out : ndarray or bool Output array of bools, or a single bool if x1 and x2 are scalars. See also equal, greater_equal, les

numpy.core.defchararray.multiply()

numpy.core.defchararray.multiply(a, i) [source] Return (a * i), that is string multiple concatenation, element-wise. Values in i of less than 0 are treated as 0 (which yields an empty string). Parameters: a : array_like of str or unicode i : array_like of ints Returns: out : ndarray Output array of str or unicode, depending on input types

numpy.core.defchararray.mod()

numpy.core.defchararray.mod(a, values) [source] Return (a % i), that is pre-Python 2.6 string formatting (iterpolation), 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 interpolated into the string. Returns: out : ndarray Output array of str or unicode, depending on input types See also str.__mod__

numpy.core.defchararray.lstrip()

numpy.core.defchararray.lstrip(a, chars=None) [source] For each element in a, return a copy with the leading characters removed. Calls str.lstrip element-wise. Parameters: a : array-like, {str, unicode} Input array. chars : {str, 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; rather, all combinations of its values are stripped.