Current File : //proc/self/root/proc/self/root/lib64/python2.7/site-packages/numpy/core/defchararray.pyc
�
E�`Qc5@s�dZddlZddlmZmZmZmZmZmZddl	m
Z
mZddl	mZ
ddlmZddlmZddlZdd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<g5Zd=aejd=d>kr_eZeZneZeZeZd?�Zd@�ZdA�ZdB�Z dC�Z!dD�Z"dE�Z#dF�Z$dG�Z%dH�Z&dI�Z'dJ�Z(dK�Z)dL�Z*dM�Z+ejdNdOfkrdPdQ�Z,n	dR�Z,d=e-dS�Z.e-e-dT�Z/e-e-dU�Z0d=e-dV�Z1dWdX�Z2d=e-dY�Z3d=e-dZ�Z4d[�Z5d\�Z6d]�Z7d^�Z8d_�Z9d`�Z:da�Z;db�Z<ejdNdOfkr�dPdc�Z=n	dd�Z=de�Z>e-df�Z?ejdNdgfkr6dh�Z@ne-di�ZAd=e-dj�ZBd=e-dk�ZCejdNdOfkr�dPdl�ZDn	dm�ZDejdNdgfkr�dn�ZEnejdNdOfkr�e-e-do�ZFne-dp�ZGe-e-dq�ZHe-dr�ZId=e-ds�ZJe-dt�ZKdu�ZLdv�ZMe-dw�ZNdx�ZOdy�ZPdz�ZQd{�ZRde
fd|��YZSe-eTe-e-d}�Ze-e-e-d~�ZUdS(ss
This module contains a set of functions for vectorized string
operations and methods.

.. note::
   The `chararray` class exists for backwards compatibility with
   Numarray, it is not recommended for new development. Starting from numpy
   1.4, if one needs arrays of strings, it is recommended to use arrays of
   `dtype` `object_`, `string_` or `unicode_`, and use the free functions
   in the `numpy.char` module for fast vectorized string operations.

Some methods will only be available if the corresponding string method is
available in your version of Python.

The preferred alias for `defchararray` is `numpy.char`.

i����N(tstring_tunicode_tintegertobject_tbool_t	character(tndarraytcompare_chararrays(tarray(t_vec_string(tasbytest	chararraytequalt	not_equalt
greater_equalt
less_equaltgreatertlesststr_lentaddtmultiplytmodt
capitalizetcentertcounttdecodetencodetendswitht
expandtabstfindtformattindextisalnumtisalphatisdigittislowertisspacetistitletisuppertjointljusttlowertlstript	partitiontreplacetrfindtrindextrjustt
rpartitiontrsplittrstriptsplitt
splitlinest
startswithtstriptswapcasettitlet	translatetuppertzfillt	isnumerict	isdecimalRtasarrayiicGsFx?|D]7}t|t�s:ttj|�jjt�rtSqWtS(s�
    Helper function for determining the output type of some string
    operations.

    For an operation on two ndarrays, if at least one is unicode, the
    result should be unicode.
    (	t
isinstancet_unicodet
issubclasstnumpyR>tdtypettypeRR(targstx((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt_use_unicode0s

cCstj|j��S(s�
    Helper function to cast a result back into a string or unicode array
    if an object array must be used as an intermediary.
    (RBR>ttolist(tresult((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt_to_string_or_unicode_array>scGs8g}x+|D]#}|dkr#Pn|j|�q
W|S(s#
    Helper function for delegating arguments to Python string
    functions.

    Many of the Python string operations that have optional arguments
    do not use 'None' to indicate a default value.  In these cases,
    we need to remove all `None` arguments, and those following them.
    N(tNonetappend(REtnewargstchk((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt_clean_argsEs	
cCs't|jjt�r |jdS|jS(s�
    Helper function that returns the number of characters per field in
    a string or unicode array.  This is to abstract out the fact that
    for a unicode array this is itemsize / 4.
    i(RARCRDRtitemsize(ta((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt_get_num_charsUscCst||dt�S(s4
    Return (x1 == x2) element-wise.

    Unlike `numpy.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, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    not_equal, greater_equal, less_equal, greater, less
    s==(RtTrue(tx1tx2((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR`scCst||dt�S(s4
    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, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, greater_equal, less_equal, greater, less
    s!=(RRS(RTRU((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR
xscCst||dt�S(s7
    Return (x1 >= x2) element-wise.

    Unlike `numpy.greater_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, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, less_equal, greater, less
    s>=(RRS(RTRU((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCst||dt�S(s4
    Return (x1 <= x2) element-wise.

    Unlike `numpy.less_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, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, greater_equal, greater, less
    s<=(RRS(RTRU((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCst||dt�S(s3
    Return (x1 > x2) element-wise.

    Unlike `numpy.greater`, 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, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, greater_equal, less_equal, less
    t>(RRS(RTRU((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCst||dt�S(s6
    Return (x1 < x2) element-wise.

    Unlike `numpy.greater`, 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, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, greater_equal, less_equal, greater
    t<(RRS(RTRU((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCst|td�S(s�
    Return len(a) element-wise.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of integers

    See also
    --------
    __builtin__.len
    t__len__(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCs_tj|�}tj|�}t|�t|�}t||�}t|||fd|f�S(s�
    Return element-wise string concatenation for two arrays of str or unicode.

    Arrays `x1` and `x2` must have the same shape.

    Parameters
    ----------
    x1 : array_like of str or unicode
        Input array.
    x2 : array_like of str or unicode
        Input array.

    Returns
    -------
    add : ndarray
        Output array of `string_` or `unicode_`, depending on input types
        of the same shape as `x1` and `x2`.

    t__add__(RBR>RRRGR	(RTRUtarr1tarr2tout_sizeRC((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRs
cCs�tj|�}tj|�}t|jjt�sBtd��nt|�tt	|j��d�}t
||jj|fd|f�S(sv
    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

    sCan only multiply by integersit__mul__(RBR>RARCRDRt
ValueErrorRRtmaxtlongR	(RQtita_arrti_arrR\((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRs%cCstt|td|f��S(s�
    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__

    t__mod__(RJR	R(RQtvalues((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR:scCs"tj|�}t||jd�S(s�
    Return a copy of `a` with only the first character of each element
    capitalized.

    Calls `str.capitalize` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode
        Input array of strings to capitalize.

    Returns
    -------
    out : ndarray
        Output array of str or unicode, depending on input
        types

    See also
    --------
    str.capitalize

    Examples
    --------
    >>> c = np.array(['a1b2','1b2a','b2a1','2a1b'],'S4'); c
    array(['a1b2', '1b2a', 'b2a1', '2a1b'],
        dtype='|S4')
    >>> np.char.capitalize(c)
    array(['A1b2', '1b2a', 'B2a1', '2a1b'],
        dtype='|S4')

    R(RBR>R	RC(RQRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRTs"iit cCs�tj|�}tj|�}ttj|j��}tj|jtj�r]t|�}nt	||jj
|fd||f�S(sO
        Return a copy of `a` with its elements centered in a string of
        length `width`.

        Calls `str.center` element-wise.

        Parameters
        ----------
        a : array_like of str or unicode

        width : int
            The length of the resulting strings
        fillchar : str or unicode, optional
            The padding character to use (default is space).

        Returns
        -------
        out : ndarray
            Output array of str or unicode, depending on input
            types

        See also
        --------
        str.center

        R(RBR>R`R_tflatt
issubdtypeRCRR
R	RD(RQtwidthtfillcharRbt	width_arrtsize((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRzscCsXtj|�}tj|�}ttj|j��}t||jj|fd|f�S(s�
        Return an array with the elements of `a` centered in a string
        of length width.

        Calls `str.center` element-wise.

        Parameters
        ----------
        a : array_like of str or unicode
        width : int
            The length of the resulting strings

        Returns
        -------
        out : ndarray, str or unicode
            Output array of str or unicode, depending on input types

        See also
        --------
        str.center
        R(RBR>R`R_RgR	RCRD(RQRiRbRkRl((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�s
cCs#t|td||gt|��S(s�
    Returns an array with the number of non-overlapping occurrences of
    substring `sub` in the range [`start`, `end`].

    Calls `str.count` element-wise.

    Parameters
    ----------
    a : array_like of str or unicode

    sub : str or unicode
       The substring to search for.

    start, end : int, optional
       Optional arguments `start` and `end` are interpreted as slice
       notation to specify the range in which to count.

    Returns
    -------
    out : ndarray
        Output array of ints.

    See also
    --------
    str.count

    Examples
    --------
    >>> c = np.array(['aAaAaA', '  aA  ', 'abBABba'])
    >>> c
    array(['aAaAaA', '  aA  ', 'abBABba'],
        dtype='|S7')
    >>> np.char.count(c, 'A')
    array([3, 1, 1])
    >>> np.char.count(c, 'aA')
    array([3, 1, 0])
    >>> np.char.count(c, 'A', start=1, end=4)
    array([2, 1, 1])
    >>> np.char.count(c, 'A', start=1, end=3)
    array([1, 0, 0])

    R(R	RRO(RQtsubtstarttend((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�s+cCs"tt|tdt||���S(s�
    Calls `str.decode` element-wise.

    The set of available codecs comes from the Python standard library,
    and may be extended at runtime.  For more information, see the
    :mod:`codecs` module.

    Parameters
    ----------
    a : array_like of str or unicode

    encoding : str, optional
       The name of an encoding

    errors : str, optional
       Specifies how to handle encoding errors

    Returns
    -------
    out : ndarray

    See also
    --------
    str.decode

    Notes
    -----
    The type of the result will depend on the encoding specified.

    Examples
    --------
    >>> c = np.array(['aAaAaA', '  aA  ', 'abBABba'])
    >>> c
    array(['aAaAaA', '  aA  ', 'abBABba'],
        dtype='|S7')
    >>> np.char.encode(c, encoding='cp037')
    array(['\x81\xc1\x81\xc1\x81\xc1', '@@\x81\xc1@@',
        '\x81\x82\xc2\xc1\xc2\x82\x81'],
        dtype='|S7')

    R(RJR	RRO(RQtencodingterrors((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�s*cCs"tt|tdt||���S(sA
    Calls `str.encode` element-wise.

    The set of available codecs comes from the Python standard library,
    and may be extended at runtime. For more information, see the codecs
    module.

    Parameters
    ----------
    a : array_like of str or unicode

    encoding : str, optional
       The name of an encoding

    errors : str, optional
       Specifies how to handle encoding errors

    Returns
    -------
    out : ndarray

    See also
    --------
    str.encode

    Notes
    -----
    The type of the result will depend on the encoding specified.

    R(RJR	RRO(RQRpRq((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRscCs#t|td||gt|��S(sU
    Returns a boolean array which is `True` where the string element
    in `a` ends with `suffix`, otherwise `False`.

    Calls `str.endswith` element-wise.

    Parameters
    ----------
    a : array_like of str or unicode

    suffix : str

    start, end : int, optional
        With optional `start`, test beginning at that position. With
        optional `end`, stop comparing at that position.

    Returns
    -------
    out : ndarray
        Outputs an array of bools.

    See also
    --------
    str.endswith

    Examples
    --------
    >>> s = np.array(['foo', 'bar'])
    >>> s[0] = 'foo'
    >>> s[1] = 'bar'
    >>> s
    array(['foo', 'bar'],
        dtype='|S3')
    >>> np.char.endswith(s, 'ar')
    array([False,  True], dtype=bool)
    >>> np.char.endswith(s, 'a', start=1, end=2)
    array([False,  True], dtype=bool)

    R(R	RRO(RQtsuffixRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR5s(icCstt|td|f��S(sS
    Return a copy of each string element where all tab characters are
    replaced by one or more spaces.

    Calls `str.expandtabs` element-wise.

    Return a copy of each string element where all tab characters are
    replaced by one or more spaces, depending on the current column
    and the given `tabsize`. The column number is reset to zero after
    each newline occurring in the string. This doesn't understand other
    non-printing characters or escape sequences.

    Parameters
    ----------
    a : array_like of str or unicode
        Input array
    tabsize : int, optional
        Replace tabs with `tabsize` number of spaces.  If not given defaults
        to 8 spaces.

    Returns
    -------
    out : ndarray
        Output array of str or unicode, depending on input type

    See also
    --------
    str.expandtabs

    R(RJR	R(RQttabsize((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR`scCs#t|td||gt|��S(s�
    For each element, return the lowest index in the string where
    substring `sub` is found.

    Calls `str.find` element-wise.

    For each element, return the lowest index in the string where
    substring `sub` is found, such that `sub` is contained in the
    range [`start`, `end`].

    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 or int
        Output array of ints.  Returns -1 if `sub` is not found.

    See also
    --------
    str.find

    R(R	RRO(RQRmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCs#t|td||gt|��S(s�
    Like `find`, but raises `ValueError` when the substring is not found.

    Calls `str.index` 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.  Returns -1 if `sub` is not found.

    See also
    --------
    find, str.find

    R(R	RRO(RQRmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCst|td�S(s�
    Returns true for each element if all characters in the string are
    alphanumeric and there is at least one character, false otherwise.

    Calls `str.isalnum` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of str or unicode, depending on input type

    See also
    --------
    str.isalnum
    R (R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR �scCst|td�S(s�
    Returns true for each element if all characters in the string are
    alphabetic and there is at least one character, false otherwise.

    Calls `str.isalpha` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of bools

    See also
    --------
    str.isalpha
    R!(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR!�scCst|td�S(s�
    Returns true for each element if all characters in the string are
    digits and there is at least one character, false otherwise.

    Calls `str.isdigit` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of bools

    See also
    --------
    str.isdigit
    R"(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR"�scCst|td�S(s�
    Returns true for each element if all cased characters in the
    string are lowercase and there is at least one cased character,
    false otherwise.

    Calls `str.islower` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of bools

    See also
    --------
    str.islower
    R#(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR#scCst|td�S(s�
    Returns true for each element if there are only whitespace
    characters in the string and there is at least one character,
    false otherwise.

    Calls `str.isspace` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of bools

    See also
    --------
    str.isspace
    R$(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR$%scCst|td�S(s�
    Returns true for each element if the element is a titlecased
    string and there is at least one character, false otherwise.

    Call `str.istitle` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of bools

    See also
    --------
    str.istitle
    R%(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR%>scCst|td�S(s�
    Returns true for each element if all cased characters in the
    string are uppercase and there is at least one character, false
    otherwise.

    Call `str.isupper` element-wise.

    For 8-bit strings, this method is locale-dependent.

    Parameters
    ----------
    a : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of bools

    See also
    --------
    str.isupper
    R&(R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR&VscCstt|td|f��S(s�
    Return a string which is the concatenation of the strings in the
    sequence `seq`.

    Calls `str.join` element-wise.

    Parameters
    ----------
    sep : array_like of str or unicode
    seq : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of str or unicode, depending on input types

    See also
    --------
    str.join
    R'(RJR	R(tseptseq((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR'oscCs�tj|�}tj|�}ttj|j��}tj|jtj�r]t|�}nt	||jj
|fd||f�S(s8
        Return an array with the elements of `a` left-justified in a
        string of length `width`.

        Calls `str.ljust` 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.ljust

        R((RBR>R`R_RgRhRCRR
R	RD(RQRiRjRbRkRl((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR(�scCsXtj|�}tj|�}ttj|j��}t||jj|fd|f�S(s�
        Return an array with the elements of `a` left-justified in a
        string of length `width`.

        Calls `str.ljust` element-wise.

        Parameters
        ----------
        a : array_like of str or unicode
        width : int
            The length of the resulting strings

        Returns
        -------
        out : ndarray
            Output array of str or unicode, depending on input type

        See also
        --------
        str.ljust
        R((RBR>R`R_RgR	RCRD(RQRiRbRkRl((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR(�s
cCs"tj|�}t||jd�S(s{
    Return an array with the elements converted to lowercase.

    Call `str.lower` 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.lower

    Examples
    --------
    >>> c = np.array(['A1B C', '1BCA', 'BCA1']); c
    array(['A1B C', '1BCA', 'BCA1'],
          dtype='|S5')
    >>> np.char.lower(c)
    array(['a1b c', '1bca', 'bca1'],
          dtype='|S5')

    R)(RBR>R	RC(RQRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR)�s cCs(tj|�}t||jd|f�S(s�
    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.

    Returns
    -------
    out : ndarray, {str, unicode}
        Output array of str or unicode, depending on input type

    See also
    --------
    str.lstrip

    Examples
    --------
    >>> c = np.array(['aAaAaA', '  aA  ', 'abBABba'])
    >>> c
    array(['aAaAaA', '  aA  ', 'abBABba'],
        dtype='|S7')

    The 'a' variable is unstripped from c[1] because whitespace leading.

    >>> np.char.lstrip(c, 'a')
    array(['AaAaA', '  aA  ', 'bBABba'],
        dtype='|S7')


    >>> np.char.lstrip(c, 'A') # leaves c unchanged
    array(['aAaAaA', '  aA  ', 'abBABba'],
        dtype='|S7')
    >>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, '')).all()
    ... # XXX: is this a regression? this line now returns False
    ... # np.char.lstrip(c,'') does not modify c at all.
    True
    >>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, None)).all()
    True

    R*(RBR>R	RC(RQtcharsRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR*�s5icCstt|td|f��S(s�
        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, unicode}
            Separator to split each string element in `a`.

        Returns
        -------
        out : ndarray, {str, unicode}
            Output array of str or unicode, depending on input type.
            The output array will have an extra dimension with 3
            elements per input element.

        See also
        --------
        str.partition

        R+(RJR	R(RQRt((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR+"scCs)tt|td||gt|���S(s%
    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

    R,(RJR	RRO(RQtoldtnewR((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR,DscCs#t|td||gt|��S(s.
    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

    R-(R	RRO(RQRmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR-cscCs#t|td||gt|��S(sx
    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

    R.(R	RRO(RQRmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR.�scCs�tj|�}tj|�}ttj|j��}tj|jtj�r]t|�}nt	||jj
|fd||f�S(s9
        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

        R/(RBR>R`R_RgRhRCRR
R	RD(RQRiRjRbRkRl((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR/�scCsXtj|�}tj|�}ttj|j��}t||jj|fd|f�S(s�
        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

        Returns
        -------
        out : ndarray
            Output array of str or unicode, depending on input type

        See also
        --------
        str.rjust
        R/(RBR>R`R_RgR	RCRD(RQRiRbRkRl((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR/�s
cCstt|td|f��S(s�
        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 unicode
            Input array
        sep : str or unicode
            Right-most separator to split each element in array.

        Returns
        -------
        out : ndarray
            Output array of string or unicode, depending on input
            type.  The output array will have an extra dimension with
            3 elements per input element.

        See also
        --------
        str.rpartition

        R0(RJR	R(RQRt((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR0�scCs t|td|gt|��S(s�
        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,
            the rightmost ones.

        Returns
        -------
        out : ndarray
           Array of list objects

        See also
        --------
        str.rsplit, split

        R1(R	RRO(RQRttmaxsplit((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR1s!cCs(tj|�}t||jd|f�S(s�
    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
    -------
    out : ndarray
        Output array of str or unicode, depending on input type

    See also
    --------
    str.rstrip

    Examples
    --------
    >>> c = np.array(['aAaAaA', 'abBABba'], dtype='S7'); c
    array(['aAaAaA', 'abBABba'],
        dtype='|S7')
    >>> np.char.rstrip(c, 'a')
    array(['aAaAaA', 'abBABb'],
        dtype='|S7')
    >>> np.char.rstrip(c, 'A')
    array(['aAaAa', 'abBABba'],
        dtype='|S7')

    R2(RBR>R	RC(RQRvRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR2%s(cCs t|td|gt|��S(s9
    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.split, rsplit

    R3(R	RRO(RQRtRy((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR3PscCst|tdt|��S(s�
    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

    R4(R	RRO(RQtkeepends((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR4qscCs#t|td||gt|��S(s
    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

    suffix : 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

    R5(R	RRO(RQtprefixRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR5�scCs+tj|�}t||jdt|��S(s�
    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 stripped.

    Returns
    -------
    out : ndarray
        Output array of str or unicode, depending on input type

    See also
    --------
    str.strip

    Examples
    --------
    >>> c = np.array(['aAaAaA', '  aA  ', 'abBABba'])
    >>> c
    array(['aAaAaA', '  aA  ', 'abBABba'],
        dtype='|S7')
    >>> np.char.strip(c)
    array(['aAaAaA', 'aA', 'abBABba'],
        dtype='|S7')
    >>> np.char.strip(c, 'a') # 'a' unstripped from c[1] because whitespace leads
    array(['AaAaA', '  aA  ', 'bBABb'],
        dtype='|S7')
    >>> np.char.strip(c, 'A') # 'A' unstripped from c[1] because (unprinted) ws trails
    array(['aAaAa', '  aA  ', 'abBABba'],
        dtype='|S7')

    R6(RBR>R	RCRO(RQRvRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR6�s,cCs"tj|�}t||jd�S(s�
    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
    array(['a1B c', '1b Ca', 'b Ca1', 'cA1b'],
        dtype='|S5')
    >>> np.char.swapcase(c)
    array(['A1b C', '1B cA', 'B cA1', 'Ca1B'],
        dtype='|S5')

    R7(RBR>R	RC(RQRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR7�s!cCs"tj|�}t||jd�S(s�
    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','b ca1','ca1b'],'S5'); c
    array(['a1b c', '1b ca', 'b ca1', 'ca1b'],
        dtype='|S5')
    >>> np.char.title(c)
    array(['A1B C', '1B Ca', 'B Ca1', 'Ca1B'],
        dtype='|S5')

    R8(RBR>R	RC(RQRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR8�s#cCsdtj|�}t|jjt�r=t||jd|f�St||jd|gt|��SdS(s,
    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

    See also
    --------
    str.translate

    R9N(RBR>RARCRDRR	RO(RQttabletdeletecharsRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR9$scCs"tj|�}t||jd�S(sx
    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.char.upper(c)
    array(['A1B C', '1BCA', 'BCA1'],
        dtype='|S5')

    R:(RBR>R	RC(RQRb((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR:Gs cCsXtj|�}tj|�}ttj|j��}t||jj|fd|f�S(s�
    Return the numeric string left-filled with zeros

    Calls `str.zfill` element-wise.

    Parameters
    ----------
    a : array_like, {str, unicode}
        Input array.
    width : int
        Width of string to left-fill elements in `a`.

    Returns
    -------
    out : ndarray, {str, unicode}
        Output array of str or unicode, depending on input type

    See also
    --------
    str.zfill

    R;(RBR>R`R_RgR	RCRD(RQRiRbRkRl((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR;js
cCs1t|�tkr!td��nt|td�S(s
    For each element, return True if there are only numeric
    characters in the element.

    Calls `unicode.isnumeric` element-wise.

    Numeric characters include digit characters, and all characters
    that have the Unicode numeric value property, e.g. ``U+2155,
    VULGAR FRACTION ONE FIFTH``.

    Parameters
    ----------
    a : array_like, unicode
        Input array.

    Returns
    -------
    out : ndarray, bool
        Array of booleans of same shape as `a`.

    See also
    --------
    unicode.isnumeric

    s:isnumeric is only available for Unicode strings and arraysR<(RGRt	TypeErrorR	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR<�scCs1t|�tkr!td��nt|td�S(s!
    For each element, return True if there are only decimal
    characters in the element.

    Calls `unicode.isdecimal` element-wise.

    Decimal characters include digit characters, and all characters
    that that can be used to form decimal-radix numbers,
    e.g. ``U+0660, ARABIC-INDIC DIGIT ZERO``.

    Parameters
    ----------
    a : array_like, unicode
        Input array.

    Returns
    -------
    out : ndarray, bool
        Array of booleans identical in shape to `a`.

    See also
    --------
    unicode.isdecimal

    s:isnumeric is only available for Unicode strings and arraysR=(RGRR~R	R(RQ((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR=�scBseZdZdedEddEdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�ZdddEd�Zejje_d�ZejdFkr�dd�Zn	d�ZddEd�ZdEdEd�ZdEdEd�ZddEd�Zd d!�ZddEd"�ZddEd#�Z d$�Z!d%�Z"d&�Z#d'�Z$d(�Z%d)�Z&d*�Z'd+�Z(ejdGkr�dd,�Z)n	d-�Z)d.�Z*dEd/�Z+ejdHkr�d1�Z,ndEd2�Z-ddEd3�Z.ddEd4�Z/ejdIkrCdd5�Z0n	d6�Z0ejdJkrgd7�Z1nejdKkr�dEdEd8�Z2ndEd9�Z3dEdEd:�Z4dEd;�Z5ddEd<�Z6dEd=�Z7d>�Z8d?�Z9dEd@�Z:dA�Z;dB�Z<dC�Z=dD�Z>RS(Ls�

    chararray(shape, itemsize=1, unicode=False, buffer=None, offset=0,
              strides=None, order=None)

    Provides a convenient view on arrays of string and unicode values.

    .. note::
       The `chararray` class exists for backwards compatibility with
       Numarray, it is not recommended for new development. Starting from numpy
       1.4, if one needs arrays of strings, it is recommended to use arrays of
       `dtype` `object_`, `string_` or `unicode_`, and use the free functions
       in the `numpy.char` module for fast vectorized string operations.

    Versus a regular Numpy array of type `str` or `unicode`, this
    class adds the following functionality:

      1) values automatically have whitespace removed from the end
         when indexed

      2) comparison operators automatically remove whitespace from the
         end when comparing values

      3) vectorized string operations are provided as methods
         (e.g. `.endswith`) and infix operators (e.g. ``"+", "*", "%"``)

    chararrays should be created using `numpy.char.array` or
    `numpy.char.asarray`, rather than this constructor directly.

    This constructor creates the array, using `buffer` (with `offset`
    and `strides`) if it is not ``None``. If `buffer` is ``None``, then
    constructs a new array with `strides` in "C order", unless both
    ``len(shape) >= 2`` and ``order='Fortran'``, in which case `strides`
    is in "Fortran order".

    Methods
    -------
    astype
    argsort
    copy
    count
    decode
    dump
    dumps
    encode
    endswith
    expandtabs
    fill
    find
    flatten
    getfield
    index
    isalnum
    isalpha
    isdecimal
    isdigit
    islower
    isnumeric
    isspace
    istitle
    isupper
    item
    join
    ljust
    lower
    lstrip
    nonzero
    put
    ravel
    repeat
    replace
    reshape
    resize
    rfind
    rindex
    rjust
    rsplit
    rstrip
    searchsorted
    setfield
    setflags
    sort
    split
    splitlines
    squeeze
    startswith
    strip
    swapaxes
    swapcase
    take
    title
    tofile
    tolist
    tostring
    translate
    transpose
    upper
    view
    zfill

    Parameters
    ----------
    shape : tuple
        Shape of the array.
    itemsize : int, optional
        Length of each array element, in number of characters. Default is 1.
    unicode : bool, optional
        Are the array elements of type unicode (True) or string (False).
        Default is False.
    buffer : int, optional
        Memory address of the start of the array data.  Default is None,
        in which case a new array is created.
    offset : int, optional
        Fixed stride displacement from the beginning of an axis?
        Default is 0. Needs to be >=0.
    strides : array_like of ints, optional
        Strides for the array (see `ndarray.strides` for full description).
        Default is None.
    order : {'C', 'F'}, optional
        The order in which the array data is stored in memory: 'C' ->
        "row major" order (the default), 'F' -> "column major"
        (Fortran) order.

    Examples
    --------
    >>> charar = np.chararray((3, 3))
    >>> charar[:] = 'a'
    >>> charar
    chararray([['a', 'a', 'a'],
           ['a', 'a', 'a'],
           ['a', 'a', 'a']],
          dtype='|S1')

    >>> charar = np.chararray(charar.shape, itemsize=5)
    >>> charar[:] = 'abc'
    >>> charar
    chararray([['abc', 'abc', 'abc'],
           ['abc', 'abc', 'abc'],
           ['abc', 'abc', 'abc']],
          dtype='|S5')

    iitCc
Cs�|rt}nt}t|�}tjddkrRt|t�rR|}	d}nd}	da|dkr�t	j
||||fd|�}
n3t	j
||||fd|d|d|d|�}
|	dk	r�|	|
d<nda|
S(	Niiitordertbuffertoffsettstrides.(RRR`tsystversion_infoR?R@RKt
_globalvarRt__new__(tsubtypetshapeRPtunicodeR�R�R�R�RCtfillertself((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�Rs(	"		
cCs,tr(|jjdkr(td��ndS(NtSUbcs-Can only create a chararray from string data.(R�RCtcharR^(R�tobj((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__array_finalize__uscCsntj||�}t|jjt�rjt|�dkrj|j�}t|�dkrad}qj|}n|S(Nit(Rt__getitem__RARCRDRt_lenR2(R�R�tvalttemp((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�zs(		cCs
t||�S(sg
        Return (self == other) element-wise.

        See also
        --------
        equal
        (R(R�tother((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__eq__�scCs
t||�S(sk
        Return (self != other) element-wise.

        See also
        --------
        not_equal
        (R
(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__ne__�scCs
t||�S(so
        Return (self >= other) element-wise.

        See also
        --------
        greater_equal
        (R(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__ge__�scCs
t||�S(sl
        Return (self <= other) element-wise.

        See also
        --------
        less_equal
        (R(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__le__�scCs
t||�S(sh
        Return (self > other) element-wise.

        See also
        --------
        greater
        (R(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__gt__�scCs
t||�S(se
        Return (self < other) element-wise.

        See also
        --------
        less
        (R(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__lt__�scCstt||��S(s�
        Return (self + other), that is string concatenation,
        element-wise for a pair of array_likes of str or unicode.

        See also
        --------
        add
        (R>R(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRY�s	cCstttj|�|��S(s�
        Return (other + self), that is string concatenation,
        element-wise for a pair of array_likes of `string_` or `unicode_`.

        See also
        --------
        add
        (R>RRB(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__radd__�s	cCstt||��S(s�
        Return (self * i), that is string multiple concatenation,
        element-wise.

        See also
        --------
        multiply
        (R>R(R�Ra((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR]�s	cCstt||��S(s�
        Return (self * i), that is string multiple concatenation,
        element-wise.

        See also
        --------
        multiply
        (R>R(R�Ra((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__rmul__�s	cCstt||��S(s�
        Return (self % i), that is pre-Python 2.6 string formatting
        (iterpolation), element-wise for a pair of array_likes of `string_`
        or `unicode_`.

        See also
        --------
        mod
        (R>R(R�Ra((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRd�s
cCstS(N(tNotImplemented(R�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt__rmod__�si����t	quicksortcCs|j�j|||�S(s
        Return the indices that sort the array lexicographically.

        For full documentation see `numpy.argsort`, for which this method is
        in fact merely a "thin wrapper."

        Examples
        --------
        >>> c = np.array(['a1b c', '1b ca', 'b ca1', 'Ca1b'], 'S5')
        >>> c = c.view(np.chararray); c
        chararray(['a1b c', '1b ca', 'b ca1', 'Ca1b'],
              dtype='|S5')
        >>> c[c.argsort()]
        chararray(['1b ca', 'Ca1b', 'a1b c', 'b ca1'],
              dtype='|S5')

        (t	__array__targsort(R�taxistkindR�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�scCstt|��S(s�
        Return a copy of `self` with only the first character of each element
        capitalized.

        See also
        --------
        char.capitalize

        (R>R(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRs
iiRfcCstt|||��S(s�
            Return a copy of `self` with its elements centered in a
            string of length `width`.

            See also
            --------
            center
            (R>R(R�RiRj((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR"s	cCstt||��S(s�
            Return a copy of `self` with its elements centered in a
            string of length `width`.

            See also
            --------
            center
            (R>R(R�Ri((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR-s	cCst||||�S(s�
        Returns an array with the number of non-overlapping occurrences of
        substring `sub` in the range [`start`, `end`].

        See also
        --------
        char.count

        (R(R�RmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR8s
cCst|||�S(sj
        Calls `str.decode` element-wise.

        See also
        --------
        char.decode

        (R(R�RpRq((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyREs	cCst|||�S(sj
        Calls `str.encode` element-wise.

        See also
        --------
        char.encode

        (R(R�RpRq((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRPs	cCst||||�S(s�
        Returns a boolean array which is `True` where the string element
        in `self` ends with `suffix`, otherwise `False`.

        See also
        --------
        char.endswith

        (R(R�RrRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR[s
icCstt||��S(s�
        Return a copy of each string element where all tab characters are
        replaced by one or more spaces.

        See also
        --------
        char.expandtabs

        (R>R(R�Rs((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRgs
cCst||||�S(s�
        For each element, return the lowest index in the string where
        substring `sub` is found.

        See also
        --------
        char.find

        (R(R�RmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRss
cCst||||�S(s�
        Like `find`, but raises `ValueError` when the substring is not found.

        See also
        --------
        char.index

        (R(R�RmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyRs	cCs
t|�S(s�
        Returns true for each element if all characters in the string
        are alphanumeric and there is at least one character, false
        otherwise.

        See also
        --------
        char.isalnum

        (R (R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR �scCs
t|�S(s�
        Returns true for each element if all characters in the string
        are alphabetic and there is at least one character, false
        otherwise.

        See also
        --------
        char.isalpha

        (R!(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR!�scCs
t|�S(s�
        Returns true for each element if all characters in the string are
        digits and there is at least one character, false otherwise.

        See also
        --------
        char.isdigit

        (R"(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR"�s
cCs
t|�S(s�
        Returns true for each element if all cased characters in the
        string are lowercase and there is at least one cased character,
        false otherwise.

        See also
        --------
        char.islower

        (R#(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR#�scCs
t|�S(s�
        Returns true for each element if there are only whitespace
        characters in the string and there is at least one character,
        false otherwise.

        See also
        --------
        char.isspace

        (R$(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR$�scCs
t|�S(s�
        Returns true for each element if the element is a titlecased
        string and there is at least one character, false otherwise.

        See also
        --------
        char.istitle

        (R%(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR%�s
cCs
t|�S(s�
        Returns true for each element if all cased characters in the
        string are uppercase and there is at least one character, false
        otherwise.

        See also
        --------
        char.isupper

        (R&(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR&�scCs
t||�S(s�
        Return a string which is the concatenation of the strings in the
        sequence `seq`.

        See also
        --------
        char.join

        (R'(R�Ru((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR'�s
cCstt|||��S(s�
            Return an array with the elements of `self` left-justified in a
            string of length `width`.

            See also
            --------
            char.ljust

            (R>R((R�RiRj((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR(�s
cCstt||��S(s�
            Return an array with the elements of `self` left-justified in a
            string of length `width`.

            See also
            --------
            ljust
            (R>R((R�Ri((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR(�s	cCstt|��S(s�
        Return an array with the elements of `self` converted to
        lowercase.

        See also
        --------
        char.lower

        (R>R)(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR)	s
cCstt||��S(s�
        For each element in `self`, return a copy with the leading characters
        removed.

        See also
        --------
        char.lstrip

        (R>R*(R�Rv((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR*	s
icCstt||��S(s�
            Partition each element in `self` around `sep`.

            See also
            --------
            partition
            (R>R+(R�Rt((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR+ 	scCstt||||��S(s�
        For each element in `self`, return a copy of the string with all
        occurrences of substring `old` replaced by `new`.

        See also
        --------
        char.replace

        (R>R,(R�RwRxR((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR,*	s
cCst||||�S(s�
        For each element in `self`, return the highest index in the string
        where substring `sub` is found, such that `sub` is contained
        within [`start`, `end`].

        See also
        --------
        char.rfind

        (R-(R�RmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR-6	scCst||||�S(s�
        Like `rfind`, but raises `ValueError` when the substring `sub` is
        not found.

        See also
        --------
        char.rindex

        (R.(R�RmRnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR.C	s
cCstt|||��S(s�
            Return an array with the elements of `self`
            right-justified in a string of length `width`.

            See also
            --------
            char.rjust

            (R>R/(R�RiRj((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR/P	s
cCstt||��S(s�
            Return an array with the elements of `self`
            right-justified in a string of length `width`.

            See also
            --------
            rjust
            (R>R/(R�Ri((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR/\	s	cCstt||��S(s�
            Partition each element in `self` around `sep`.

            See also
            --------
            rpartition
            (R>R0(R�Rt((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR0h	scCst|||�S(s�
            For each element in `self`, return a list of the words in
            the string, using `sep` as the delimiter string.

            See also
            --------
            char.rsplit

            (R1(R�RtRy((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR1s	s
cCstt||��S(s�
        For each element in `self`, return a copy with the trailing
        characters removed.

        See also
        --------
        char.rstrip

        (R>R2(R�Rv((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR2	s
cCst|||�S(s�
        For each element in `self`, return a list of the words in the
        string, using `sep` as the delimiter string.

        See also
        --------
        char.split

        (R3(R�RtRy((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR3�	s
cCs
t||�S(s�
        For each element in `self`, return a list of the lines in the
        element, breaking at line boundaries.

        See also
        --------
        char.splitlines

        (R4(R�Rz((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR4�	s
cCst||||�S(s�
        Returns a boolean array which is `True` where the string element
        in `self` starts with `prefix`, otherwise `False`.

        See also
        --------
        char.startswith

        (R5(R�R{RnRo((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR5�	s
cCstt||��S(s�
        For each element in `self`, return a copy with the leading and
        trailing characters removed.

        See also
        --------
        char.strip

        (R>R6(R�Rv((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR6�	s
cCstt|��S(s�
        For each element in `self`, return a copy of the string with
        uppercase characters converted to lowercase and vice versa.

        See also
        --------
        char.swapcase

        (R>R7(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR7�	s
cCstt|��S(s�
        For each element in `self`, return a titlecased version of the
        string: words start with uppercase characters, all remaining cased
        characters are lowercase.

        See also
        --------
        char.title

        (R>R8(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR8�	scCstt|||��S(sB
        For each element in `self`, 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.

        See also
        --------
        char.translate

        (R>R9(R�R|R}((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR9�	scCstt|��S(s�
        Return an array with the elements of `self` converted to
        uppercase.

        See also
        --------
        char.upper

        (R>R:(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR:�	s
cCstt||��S(s�
        Return the numeric string left-filled with zeros in a string of
        length `width`.

        See also
        --------
        char.zfill

        (R>R;(R�Ri((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR;�	s
cCs
t|�S(s�
        For each element in `self`, return True if there are only
        numeric characters in the element.

        See also
        --------
        char.isnumeric

        (R<(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR<�	s
cCs
t|�S(s�
        For each element in `self`, return True if there are only
        decimal characters in the element.

        See also
        --------
        char.isdecimal

        (R=(R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR=
s
N(ii(ii(ii(ii(ii(ii(?t__name__t
__module__t__doc__tFalseRKR�R�R�R�R�R�R�R�R�RYR�R]R�RdR�R�RRR�R�RRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4R5R6R7R8R9R:R;R<R=(((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR�s��	"			
	
	
	
	
	
								
	
	
		
	
		
			

	
		
			cCsxt|ttf�rO|dkrBt|t�r9t}qBt}n|dkr]t|�}nt|�|}|r!tjdkrtj	dkr�|j
d�}qt|t�r�tj
|d�}tj|d�}|j}qtj
|d�}tj|d�}|j}q-t|�}nt|�}t|d|d|d	|d
|�St|ttf�rvtj|�}nt|t�r�t|jjt�r�t|t�s�|jt�}n|dkr�|j}t|jjt�r�|d:}q�n|dkr(t|jjt�rt}q(t}n|r7t}	nt}	|dk	ratj|d
|�}n|s�||jks�|r�t|t�s�|r�t|t�r�|j|	t|�f�}n|St|t�rt|jjt�r|dkr|j �}qn|rt}	nt}	|dkrGt!|d|	d
|d
t�}
n$t!|d|	|fd
|d
t�}
|
jt�S(s�	
    Create a `chararray`.

    .. note::
       This class is provided for numarray backward-compatibility.
       New code (not concerned with numarray compatibility) should use
       arrays of type `string_` or `unicode_` and use the free functions
       in :mod:`numpy.char <numpy.core.defchararray>` for fast
       vectorized string operations instead.

    Versus a regular Numpy array of type `str` or `unicode`, this
    class adds the following functionality:

      1) values automatically have whitespace removed from the end
         when indexed

      2) comparison operators automatically remove whitespace from the
         end when comparing values

      3) vectorized string operations are provided as methods
         (e.g. `str.endswith`) and infix operators (e.g. ``+, *, %``)

    Parameters
    ----------
    obj : array of str or unicode-like

    itemsize : int, optional
        `itemsize` is the number of characters per scalar in the
        resulting array.  If `itemsize` is None, and `obj` is an
        object array or a Python list, the `itemsize` will be
        automatically determined.  If `itemsize` is provided and `obj`
        is of type str or unicode, then the `obj` string will be
        chunked into `itemsize` pieces.

    copy : bool, optional
        If true (default), then the object is copied.  Otherwise, a copy
        will only be made if __array__ returns a copy, if obj is a
        nested sequence, or if a copy is needed to satisfy any of the other
        requirements (`itemsize`, unicode, `order`, etc.).

    unicode : bool, optional
        When true, the resulting `chararray` can contain Unicode
        characters, when false only 8-bit characters.  If unicode is
        `None` and `obj` is one of the following:

          - a `chararray`,
          - an ndarray of type `str` or `unicode`
          - a Python str or unicode object,

        then the unicode setting of the output array will be
        automatically determined.

    order : {'C', 'F', 'A'}, optional
        Specify the order of the array.  If order is 'C' (default), then the
        array will be in C-contiguous order (last-index varies the
        fastest).  If order is 'F', then the returned array
        will be in Fortran-contiguous order (first-index varies the
        fastest).  If order is 'A', then the returned array may
        be in any order (either C-, Fortran-contiguous, or even
        discontiguous).
    i��itutf_32tu1tu4tu2RPR�R�R�iRCtsubokN("R?t_bytesR@RKRSR�R�R�t
maxunicodet
hexversionRtstrRBt
frombufferRtdataRtlistttupleR>RRARCRDRtviewRPRRtastypeR`tobjectRHtnarray(R�RPtcopyR�R�R�tasciitucs4tucs2RCR�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR
sr>		

$				$	!$c	Cst||dtd|d|�S(s�
    Convert the input to a `chararray`, copying the data only if
    necessary.

    Versus a regular Numpy array of type `str` or `unicode`, this
    class adds the following functionality:

      1) values automatically have whitespace removed from the end
         when indexed

      2) comparison operators automatically remove whitespace from the
         end when comparing values

      3) vectorized string operations are provided as methods
         (e.g. `str.endswith`) and infix operators (e.g. +, *, %)

    Parameters
    ----------
    obj : array of str or unicode-like

    itemsize : int, optional
        `itemsize` is the number of characters per scalar in the
        resulting array.  If `itemsize` is None, and `obj` is an
        object array or a Python list, the `itemsize` will be
        automatically determined.  If `itemsize` is provided and `obj`
        is of type str or unicode, then the `obj` string will be
        chunked into `itemsize` pieces.

    unicode : bool, optional
        When true, the resulting `chararray` can contain Unicode
        characters, when false only 8-bit characters.  If unicode is
        `None` and `obj` is one of the following:

          - a `chararray`,
          - an ndarray of type `str` or 'unicode`
          - a Python str or unicode object,

        then the unicode setting of the output array will be
        automatically determined.

    order : {'C', 'F'}, optional
        Specify the order of the array.  If order is 'C' (default), then the
        array will be in C-contiguous order (last-index varies the
        fastest).  If order is 'F', then the returned array
        will be in Fortran-contiguous order (first-index varies the
        fastest).
    R�R�R�(RR�(R�RPR�R�((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyR>�
s0(VR�R�tnumerictypesRRRRRRtnumericRRRR�tnumpy.core.multiarrayR	tnumpy.compatR
RBt__all__R�R�R�R@tbytesR�R�tlenR�RGRJRORRRR
RRRRRRRRRRRKRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4R5R6R7R8R9R:R;R<R=RRSR>(((s=/usr/lib64/python2.7/site-packages/numpy/core/defchararray.pyt<module>s�.																%#	--"+"'								"		#8""	"$+!/	$	&#	#			���R�