
    (ph                       S r SSKrSSKJr  SSKJrJrJrJrJ	r	J
r
Jr  SSKJrJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKr/ SQrSq\R4                  " \R6                  SS9rS rS]S jrS rS rS r \" \ 5      S 5       r!\" \ 5      S 5       r"\" \ 5      S 5       r#\" \ 5      S 5       r$\" \ 5      S 5       r%\" \ 5      S 5       r&S r'\" \'5      S 5       r(\" \ 5      S 5       r)S r*\" \*5      S 5       r+S r,\" \,5      S  5       r-\" \'5      S! 5       r.S]S" jr/\" \/5      S^S# j5       r0S_S$ jr1\" \15      S`S% j5       r2S_S& jr3\" \35      S_S' j5       r4\" \35      S_S( j5       r5S_S) jr6\" \65      S`S* j5       r7S]S+ jr8\" \85      SaS, j5       r9\" \15      S`S- j5       r:\" \15      S`S. j5       r;\" \'5      S/ 5       r<\" \'5      S0 5       r=\" \'5      S1 5       r>\" \'5      S2 5       r?\" \'5      S3 5       r@\" \'5      S4 5       rA\" \'5      S5 5       rBS6 rC\" \C5      S7 5       rDS]S8 jrE\" \E5      S^S9 j5       rF\" \'5      S: 5       rGS]S; jrH\" \H5      S]S< j5       rIS= rJ\" \J5      S> 5       rKS]S? jrL\" \L5      S]S@ j5       rM\" \15      S`SA j5       rN\" \15      S`SB j5       rO\" \E5      S^SC j5       rP\" \J5      SD 5       rQS_SE jrR\" \R5      S_SF j5       rSS]SG jrH\" \H5      S]SH j5       rT\" \R5      S_SI j5       rUS]SJ jrV\" \V5      S]SK j5       rWS_SL jrX\" \X5      S`SM j5       rY\" \H5      S]SN j5       rZ\" \'5      SO 5       r[\" \'5      SP 5       r\S]SQ jr]\" \]5      S]SR j5       r^\" \'5      SS 5       r_ST r`\" \`5      SU 5       ra\" \'5      SV 5       rb\" \'5      SW 5       rc\" SX5       " SY SZ\5      5       rd\" S5      SbS[ j5       r\" S5      ScS\ j5       reg)dan  
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_`, `bytes_` or `str_`, 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`.

    N   )
set_module   )bytes_str_integerint_object_bool_	character)ndarraycompare_chararraysarray)_vec_string)	overrides)asbytes)3equal	not_equalgreater_equal
less_equalgreaterlessstr_lenaddmultiplymod
capitalizecentercountdecodeencodeendswith
expandtabsfindindexisalnumisalphaisdigitislowerisspaceistitleisupperjoinljustlowerlstrip	partitionreplacerfindrindexrjust
rpartitionrsplitrstripsplit
splitlines
startswithstripswapcasetitle	translateupperzfill	isnumeric	isdecimalr   asarrayz
numpy.char)modulec                     [        U [        5      (       d=  [        [        R                  " U 5      R
                  R                  [        5      (       a  gg)z{Returns True if arr is a string or a string array with a dtype that
represents a unicode string, otherwise returns False.

TF)
isinstancestr
issubclassnumpyrE   dtypetype)arrs    J/var/www/html/venv/lib/python3.13/site-packages/numpy/core/defchararray.py_is_unicoderP   1   s9    
 	3u}}S)//44c::    c                     [         R                  " U R                  5       5      n[        USS5      nUb(  UR	                  [        U5      " [        U5      5      SS9$ U$ )z
Helper function to cast a result back into an array
with the appropriate dtype if an object array must be used
as an intermediary.
rL   NF)copy)rK   rE   tolistgetattrastyperM   _get_num_chars)resultoutput_dtype_likeretrL   s       rO   _to_bytes_or_str_arrayr[   <   sS     --
(C%w5Ezz$u+nS&9:zGGJrQ   c                  J    / nU  H  nUc    U$ UR                  U5        M     U$ )a	  
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.
)append)argsnewargschks      rO   _clean_argsra   I   s5     G;N 	s  NrQ   c                     [        U R                  R                  [        5      (       a  U R                  S-  $ U R                  $ )z
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.
   )rJ   rL   rM   r   itemsizeas    rO   rW   rW   Y   s1     !'',,%%zzQ::rQ   c                     X4$ N x1x2s     rO   _binary_op_dispatcherrm   d   s	    8OrQ   c                     [        XSS5      $ )a  
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
    Output array of bools.

See Also
--------
not_equal, greater_equal, less_equal, greater, less
z==Tr   rj   s     rO   r   r   h       . bdD11rQ   c                     [        XSS5      $ )a  
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
    Output array of bools.

See Also
--------
equal, greater_equal, less_equal, greater, less
z!=Tro   rj   s     rO   r   r      rp   rQ   c                     [        XSS5      $ )a  
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
    Output array of bools.

See Also
--------
equal, not_equal, less_equal, greater, less
z>=Tro   rj   s     rO   r   r      s    0 bdD11rQ   c                     [        XSS5      $ )a  
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
    Output array of bools.

See Also
--------
equal, not_equal, greater_equal, greater, less
z<=Tro   rj   s     rO   r   r      rp   rQ   c                     [        XSS5      $ )a  
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
    Output array of bools.

See Also
--------
equal, not_equal, greater_equal, less_equal, less
>Tro   rj   s     rO   r   r          . bc400rQ   c                     [        XSS5      $ )a  
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
    Output array of bools.

See Also
--------
equal, not_equal, greater_equal, less_equal, greater
<Tro   rj   s     rO   r   r      rv   rQ   c                     U 4$ rh   ri   re   s    rO   _unary_op_dispatcherrz     	    4KrQ   c                 $    [        U [        S5      $ )u  
Return len(a) element-wise.

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

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

See Also
--------
len

Examples
--------
>>> a = np.array(['Grace Hopper Conference', 'Open Source Day'])
>>> np.char.str_len(a)
array([23, 15])
>>> a = np.array([u'Р', u'о'])
>>> np.char.str_len(a)
array([1, 1])
>>> a = np.array([['hello', 'world'], [u'Р', u'о']])
>>> np.char.str_len(a)
array([[5, 5], [1, 1]])
__len__)r   r	   re   s    rO   r   r   	  s    B q$	**rQ   c                 |   [         R                  " U 5      n[         R                  " U5      n[        U5      [        U5      -   n[        UR                  5      [        UR                  5      :w  a&  [        SUR                   SUR                   S35      e[        U[        UR                  5      " U5      SU45      $ )a  
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 `bytes_` or `str_`, depending on input types
    of the same shape as `x1` and `x2`.

zLnp.char.add() requires both arrays of the same dtype kind, but got dtypes: 'z' and 'zJ' (the few cases where this used to work often lead to incorrect results).__add__)rK   rE   rW   rM   rL   	TypeErrorr   )rk   rl   arr1arr2out_sizes        rO   r   r   -  s    * ==D==Dd#nT&::HDJJ4

++  JJ<wtzzl ;HHI 	I
 tT$**-h7TGLLrQ   c                     U 4$ rh   ri   )rf   is     rO   _multiply_dispatcherr   S  r{   rQ   c                 p   [         R                  " U 5      n[         R                  " U5      n[        UR                  R                  [
        5      (       d  [        S5      e[        U5      [        [        UR                  5       5      S5      -  n[        U[	        UR                  5      " U5      SU45      $ )an  
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

Examples
--------
>>> a = np.array(["a", "b", "c"])
>>> np.char.multiply(x, 3)
array(['aaa', 'bbb', 'ccc'], dtype='<U3')
>>> i = np.array([1, 2, 3])
>>> np.char.multiply(a, i)
array(['a', 'bb', 'ccc'], dtype='<U3')
>>> np.char.multiply(np.array(['a']), i)
array(['a', 'aa', 'aaa'], dtype='<U3')
>>> a = np.array(['a', 'b', 'c', 'd', 'e', 'f']).reshape((2, 3))
>>> np.char.multiply(a, 3)
array([['aaa', 'bbb', 'ccc'],
       ['ddd', 'eee', 'fff']], dtype='<U3')
>>> np.char.multiply(a, i)
array([['a', 'bb', 'ccc'],
       ['d', 'ee', 'fff']], dtype='<U3')
zCan only multiply by integersr   __mul__)rK   rE   rJ   rL   rM   r   
ValueErrorrW   maxintr   )rf   r   a_arri_arrr   s        rO   r   r   W  s    L MM!EMM!Eekk&&00899e$s3uyy{+;Q'??HtEKK *IxA ArQ   c                     X4$ rh   ri   rf   valuess     rO   _mod_dispatcherr     s
    ;rQ   c                 <    [        [        U [        SU45      U 5      $ )a  
Return (a % i), that is pre-Python 2.6 string formatting
(interpolation), 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__

__mod__r[   r   r
   r   s     rO   r   r     s#    0 "Aw	F95q: :rQ   c                 Z    [         R                  " U 5      n[        XR                  S5      $ )ah  
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   rK   rE   r   rL   rf   r   s     rO   r   r     s$    F MM!Eukk<88rQ   c                     U 4$ rh   ri   rf   widthfillchars      rO   _center_dispatcherr     r{   rQ   c                 z   [         R                  " U 5      n[         R                  " U5      n[        [         R                  " UR                  5      5      n[         R
                  " UR                  [         R                  5      (       a  [        U5      n[        U[        UR                  5      " U5      SXB45      $ )a  
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

Notes
-----
This function is intended to work with arrays of strings.  The
fill character is not applied to numeric types.

Examples
--------
>>> c = np.array(['a1b2','1b2a','b2a1','2a1b']); c
array(['a1b2', '1b2a', 'b2a1', '2a1b'], dtype='<U4')
>>> np.char.center(c, width=9)
array(['   a1b2  ', '   1b2a  ', '   b2a1  ', '   2a1b  '], dtype='<U9')
>>> np.char.center(c, width=9, fillchar='*')
array(['***a1b2**', '***1b2a**', '***b2a1**', '***2a1b**'], dtype='<U9')
>>> np.char.center(c, width=1)
array(['a', '1', 'b', '2'], dtype='<U1')

r   rK   rE   r   r   flat
issubdtyperL   r   r   r   rM   rf   r   r   r   	width_arrsizes         rO   r   r     s    X MM!Ee$Iuyy()DU\\228$tEKK &92GI IrQ   c                     U 4$ rh   ri   rf   substartends       rO   _count_dispatcherr     r{   rQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a6  
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='<U7')
>>> 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   r	   ra   r   s       rO   r    r    
  s"    V q$#C8H)HIIrQ   c                     U 4$ rh   ri   rf   encodingerrorss      rO   _code_dispatcherr   8  r{   rQ   c                 J    [        [        U [        S[        X5      5      5      $ )aZ  
Calls ``bytes.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
--------
:py:meth:`bytes.decode`

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

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

r!   r[   r   r
   ra   r   s      rO   r!   r!   <  s'    T "Aw+h*GHJ JrQ   c                 J    [        [        U [        S[        X5      5      5      $ )a  
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"   r   r   s      rO   r"   r"   j  s'    @ "Aw+h*GHJ JrQ   c                     U 4$ rh   ri   rf   suffixr   r   s       rO   _endswith_dispatcherr     r{   rQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a  
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='<U3')
>>> np.char.endswith(s, 'ar')
array([False,  True])
>>> np.char.endswith(s, 'a', start=1, end=2)
array([False,  True])

r#   r   r   ra   r   s       rO   r#   r#     s)    P 	5*voC0@@B BrQ   c                     U 4$ rh   ri   rf   tabsizes     rO   _expandtabs_dispatcherr     r{   rQ   c                 <    [        [        U [        SU45      U 5      $ )a  
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$   r   r   s     rO   r$   r$     s$    @ "Awwj91> >rQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a  
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

Examples
--------
>>> a = np.array(["NumPy is a Python library"])
>>> np.char.find(a, "Python", start=0, end=None)
array([11])

r%   r   r   s       rO   r%   r%     s'    L 	4#C(88: :rQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a  
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

Examples
--------
>>> a = np.array(["Computer Science"])
>>> np.char.index(a, "Science", start=0, end=None)
array([9])

r&   r   r   s       rO   r&   r&     s&    > 	43,S)99; ;rQ   c                 $    [        U [        S5      $ )a  
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   re   s    rO   r'   r'   3      . q%++rQ   c                 $    [        U [        S5      $ )al  
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   re   s    rO   r(   r(   M  r   rQ   c                 $    [        U [        S5      $ )aS  
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

Examples
--------
>>> a = np.array(['a', 'b', '0'])
>>> np.char.isdigit(a)
array([False, False,  True])
>>> a = np.array([['a', 'b', '0'], ['c', '1', '2']])
>>> np.char.isdigit(a)
array([[False, False,  True], [False,  True,  True]])
r)   r   re   s    rO   r)   r)   g  s    @ q%++rQ   c                 $    [        U [        S5      $ )aw  
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   re   s    rO   r*   r*         0 q%++rQ   c                 $    [        U [        S5      $ )as  
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   re   s    rO   r+   r+     r   rQ   c                 $    [        U [        S5      $ )ab  
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   re   s    rO   r,   r,     r   rQ   c                 $    [        U [        S5      $ )a   
Return 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

Examples
--------
>>> str = "GHC"
>>> np.char.isupper(str)
array(True)     
>>> a = np.array(["hello", "HELLO", "Hello"])
>>> np.char.isupper(a)
array([False,  True, False]) 

r-   r   re   s    rO   r-   r-     s    D q%++rQ   c                     X4$ rh   ri   sepseqs     rO   _join_dispatcherr     s
    :rQ   c                 <    [        [        U [        SU45      U5      $ )a  
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

Examples
--------
>>> np.char.join('-', 'osd')
array('o-s-d', dtype='<U5')

>>> np.char.join(['-', '.'], ['ghc', 'osd'])
array(['g-h-c', 'o.s.d'], dtype='<U5')

r.   r   r   s     rO   r.   r.     s#    > "C&3&138 8rQ   c                     U 4$ rh   ri   r   s      rO   _just_dispatcherr   '  r{   rQ   c                 z   [         R                  " U 5      n[         R                  " U5      n[        [         R                  " UR                  5      5      n[         R
                  " UR                  [         R                  5      (       a  [        U5      n[        U[        UR                  5      " U5      SXB45      $ )a  
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/   r   r   s         rO   r/   r/   +      6 MM!Ee$Iuyy()DU\\228$tEKK &)1FH HrQ   c                 Z    [         R                  " U 5      n[        XR                  S5      $ )a  
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='<U5')
>>> np.char.lower(c)
array(['a1b c', '1bca', 'bca1'], dtype='<U5')

r0   r   r   s     rO   r0   r0   O  #    > MM!Eukk733rQ   c                     U 4$ rh   ri   rf   charss     rO   _strip_dispatcherr   r  r{   rQ   c                 ^    [         R                  " U 5      n[        X"R                  SU45      $ )a  
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='<U7')

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

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


>>> np.char.lstrip(c, 'A') # leaves c unchanged
array(['aAaAaA', '  aA  ', 'abBABba'], dtype='<U7')
>>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, '')).all()
... # XXX: is this a regression? This used to return True
... # np.char.lstrip(c,'') does not modify c at all.
False
>>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, None)).all()
True

r1   r   rf   r   r   s      rO   r1   r1   v  s(    f MM!Eukk8eX>>rQ   c                     U 4$ rh   ri   rf   r   s     rO   _partition_dispatcherr     r{   rQ   c                 <    [        [        U [        SU45      U 5      $ )a  
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

r2   r   r   s     rO   r2   r2     s$    @ "AwcV4a9 9rQ   c                     U 4$ rh   ri   rf   oldnewr    s       rO   _replace_dispatcherr     r{   rQ   c                 T    [        [        U [        SX/[        U5      -   5      U 5      $ )a.  
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

Examples
--------
>>> a = np.array(["That is a mango", "Monkeys eat mangos"])
>>> np.char.replace(a, 'mango', 'banana')
array(['That is a banana', 'Monkeys eat bananas'], dtype='<U19')

>>> a = np.array(["The dish is fresh", "This is it"])
>>> np.char.replace(a, 'is', 'was')
array(['The dwash was fresh', 'Thwas was it'], dtype='<U19')
r3   r   r   s       rO   r3   r3     s0    J "Aw	C:E8J+JKQP PrQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a  
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

r4   r   r   s       rO   r4   r4     s&    : 	43,S)99; ;rQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a8  
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

r5   r   r   s       rO   r5   r5   #  s&    4 	4C<+c*::< <rQ   c                 z   [         R                  " U 5      n[         R                  " U5      n[        [         R                  " UR                  5      5      n[         R
                  " UR                  [         R                  5      (       a  [        U5      n[        U[        UR                  5      " U5      SXB45      $ )a  
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

r6   r   r   s         rO   r6   r6   A  r   rQ   c                 <    [        [        U [        SU45      U 5      $ )a
  
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

r7   r   r   s     rO   r7   r7   e  s$    @ "Awsf5q: :rQ   c                     U 4$ rh   ri   rf   r   maxsplits      rO   _split_dispatcherr     r{   rQ   c           	      @    [        U [        SU/[        U5      -   5      $ )aH  
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

r8   r   r
   ra   r   s      rO   r8   r8     s'    D 	7Hsek(&;;= =rQ   c                     U 4$ rh   ri   r   s     rO   r   r     r{   rQ   c                 ^    [         R                  " U 5      n[        X"R                  SU45      $ )aS  
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, b'a')
array(['aAaAaA', 'abBABb'],
    dtype='|S7')
>>> np.char.rstrip(c, b'A')
array(['aAaAa', 'abBABba'],
    dtype='|S7')

r9   r   r   s      rO   r9   r9     s(    R MM!Eukk8eX>>rQ   c           	      @    [        U [        SU/[        U5      -   5      $ )a  
For each element in `a`, return a list of the words in the
string, using `sep` as the delimiter string.

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

r:   r   r   s      rO   r:   r:     s&    > 	7GcU[%::< <rQ   c                     U 4$ rh   ri   rf   keependss     rO   _splitlines_dispatcherr     r{   rQ   c                 8    [        U [        S[        U5      5      $ )a  
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

r;   r   r   s     rO   r;   r;     s    4 	7L+h"79 9rQ   c                     U 4$ rh   ri   rf   prefixr   r   s       rO   _startswith_dispatcherr   )  r{   rQ   c           	      @    [        U [        SX/[        U5      -   5      $ )a  
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

r<   r   r   s       rO   r<   r<   -  s(    8 	5,+c2B BD DrQ   c                 n    [         R                  " U 5      n[        X"R                  S[	        U5      5      $ )a&  
For each element in `a`, return a copy with the leading and
trailing characters removed.

Calls `str.strip` 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='<U7')
>>> np.char.strip(c)
array(['aAaAaA', 'aA', 'abBABba'], dtype='<U7')
>>> np.char.strip(c, 'a') # 'a' unstripped from c[1] because whitespace leads
array(['AaAaA', '  aA  ', 'bBABb'], dtype='<U7')
>>> np.char.strip(c, 'A') # 'A' unstripped from c[1] because (unprinted) ws trails
array(['aAaAa', '  aA  ', 'abBABba'], dtype='<U7')

r=   )rK   rE   r   rL   ra   r   s      rO   r=   r=   M  s+    R MM!Eukk7K4FGGrQ   c                 Z    [         R                  " U 5      n[        XR                  S5      $ )as  
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')

r>   r   r   s     rO   r>   r>   z  s$    D MM!Eukk:66rQ   c                 Z    [         R                  " U 5      n[        XR                  S5      $ )a  
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')

r?   r   r   s     rO   r?   r?     s$    H MM!Eukk733rQ   c                     U 4$ rh   ri   )rf   tabledeletecharss      rO   _translate_dispatcherr    r{   rQ   c           	          [         R                  " U 5      n[        UR                  R                  [
        5      (       a  [        X3R                  SU45      $ [        X3R                  SU/[        U5      -   5      $ )a  
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

r@   )rK   rE   rJ   rL   rM   r   r   ra   )rf   r  r  r   s       rO   r@   r@     sk    8 MM!E%++""D));;eX7 	7 ;;eW{;7O-OQ 	QrQ   c                 Z    [         R                  " U 5      n[        XR                  S5      $ )a  
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='<U5')
>>> np.char.upper(c)
array(['A1B C', '1BCA', 'BCA1'], dtype='<U5')

rA   r   r   s     rO   rA   rA     r   rQ   c                     U 4$ rh   ri   )rf   r   s     rO   _zfill_dispatcherr    r{   rQ   c                     [         R                  " U 5      n[         R                  " U5      n[        [         R                  " UR                  5      5      n[        U[        UR                  5      " U5      SU45      $ )aa  
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

rB   )rK   rE   r   r   r   r   rM   rL   )rf   r   r   r   r   s        rO   rB   rB     s]    0 MM!Ee$Iuyy()DtEKK &)? ?rQ   c                 Z    [        U 5      (       d  [        S5      e[        U [        S5      $ )aD  
For each element, return True if there are only numeric
characters in the element.

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

Examples
--------
>>> np.char.isnumeric(['123', '123abc', '9.0', '1/4', 'VIII'])
array([ True, False, False, False, False])

z:isnumeric is only available for Unicode strings and arraysrC   rP   r   r   r   re   s    rO   rC   rC   7  s)    @ q>>TUUq%--rQ   c                 Z    [        U 5      (       d  [        S5      e[        U [        S5      $ )a:  
For each element, return True if there are only decimal
characters in the element.

Calls `str.isdecimal` element-wise.

Decimal characters include digit characters, and all characters
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
--------
str.isdecimal

Examples
--------
>>> np.char.isdecimal(['12345', '4.99', '123ABC', ''])
array([ True, False, False, False])

z:isdecimal is only available for Unicode strings and arraysrD   r  re   s    rO   rD   rD   \  s/    @ q>>HJ 	Jq%--rQ   rK   c                      \ rS rSrSr  S<S jrS rS rS rS r	S	 r
S
 rS rS rS rS rS rS rS rS rS=S jr\R(                  R                  \l        S rS>S jrS?S jrS@S jrS@S jrS?S jrSAS jrS?S jrS?S jrS rS r S r!S  r"S! r#S" r$S# r%S$ r&S>S% jr'S& r(SBS' jr)S( r*SBS) jr+S?S* jr,S?S+ jr-S>S, jr.S- r/S@S. jr0SBS/ jr1S@S0 jr2SBS1 jr3S?S2 jr4SBS3 jr5S4 r6S5 r7SBS6 jr8S7 r9S8 r:S9 r;S: r<S;r=g)C	chararrayi  a!  
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_`, `bytes_` or `str_`, 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='F'``, 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 : object exposing the buffer interface or str, 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([[b'a', b'a', b'a'],
           [b'a', b'a', b'a'],
           [b'a', b'a', b'a']], dtype='|S1')

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

Nc           
          U(       a  [         nO[        n[        U5      n[        U[        5      (       a  Un	S nOS n	SqUc  [        R                  " XX4US9n
O[        R                  " XX4UXVUS9n
U	b  XS'   SqU
$ )Nr   order)bufferoffsetstridesr  .r   )r   r   r   rH   rI   
_globalvarr   __new__)subtypeshaperd   unicoder  r  r  r  rL   fillerselfs              rO   r  chararray.__new__  s     EE
 x=fc""FFF
>??7E3D).0D ??7E3D*0*0).0D I
rQ   c                 f    [         (       d&  U R                  R                  S;  a  [        S5      eg g )NSUbcz-Can only create a chararray from string data.)r  rL   charr   )r  objs     rO   __array_finalize__chararray.__array_finalize__2  s)    zdjjooV;LMM <zrQ   c                     [         R                  " X5      n[        U[        5      (       a%  UR	                  5       n[        U5      S:X  a  SnU$ UnU$ )Nr    )r   __getitem__rH   r   r9   len)r  r   valtemps       rO   r%  chararray.__getitem__7  sM    !!$,c9%%::<D4yA~ 
 
rQ   c                     [        X5      $ )z?
Return (self == other) element-wise.

See Also
--------
equal
)r   r  others     rO   __eq__chararray.__eq__H  s     T!!rQ   c                     [        X5      $ )zC
Return (self != other) element-wise.

See Also
--------
not_equal
)r   r+  s     rO   __ne__chararray.__ne__R  s     %%rQ   c                     [        X5      $ )zG
Return (self >= other) element-wise.

See Also
--------
greater_equal
)r   r+  s     rO   __ge__chararray.__ge__\  s     T))rQ   c                     [        X5      $ )zD
Return (self <= other) element-wise.

See Also
--------
less_equal
)r   r+  s     rO   __le__chararray.__le__f  s     $&&rQ   c                     [        X5      $ )z@
Return (self > other) element-wise.

See Also
--------
greater
)r   r+  s     rO   __gt__chararray.__gt__p  s     t##rQ   c                     [        X5      $ )z=
Return (self < other) element-wise.

See Also
--------
less
)r   r+  s     rO   __lt__chararray.__lt__z  s     D  rQ   c                 *    [        [        X5      5      $ )z
Return (self + other), that is string concatenation,
element-wise for a pair of array_likes of str or unicode.

See Also
--------
add
)rE   r   r+  s     rO   r   chararray.__add__  s     s4'((rQ   c                 T    [        [        [        R                   " U5      U 5      5      $ )z
Return (other + self), that is string concatenation,
element-wise for a pair of array_likes of `bytes_` or `str_`.

See Also
--------
add
)rE   r   rK   r+  s     rO   __radd__chararray.__radd__  s     s5==/677rQ   c                 *    [        [        X5      5      $ ze
Return (self * i), that is string multiple concatenation,
element-wise.

See Also
--------
multiply
rE   r   r  r   s     rO   r   chararray.__mul__       x())rQ   c                 *    [        [        X5      5      $ rD  rE  rF  s     rO   __rmul__chararray.__rmul__  rH  rQ   c                 *    [        [        X5      5      $ )z
Return (self % i), that is pre-Python 2.6 string formatting
(interpolation), element-wise for a pair of array_likes of `bytes_`
or `str_`.

See Also
--------
mod
)rE   r   rF  s     rO   r   chararray.__mod__  s     s4|$$rQ   c                     [         $ rh   )NotImplementedr+  s     rO   __rmod__chararray.__rmod__  s    rQ   c                 B    U R                  5       R                  XU5      $ )a  
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')

)	__array__argsort)r  axiskindr  s       rO   rT  chararray.argsort  s    $ ~~''E::rQ   c                 *    [        [        U 5      5      $ )zx
Return a copy of `self` with only the first character of each element
capitalized.

See Also
--------
char.capitalize

)rE   r   r  s    rO   r   chararray.capitalize  s     z$'((rQ   c                 ,    [        [        XU5      5      $ )zm
Return a copy of `self` with its elements centered in a
string of length `width`.

See Also
--------
center
)rE   r   r  r   r   s      rO   r   chararray.center  s     vd8455rQ   c                     [        XX#5      $ )z
Returns an array with the number of non-overlapping occurrences of
substring `sub` in the range [`start`, `end`].

See Also
--------
char.count

)r    r  r   r   r   s       rO   r    chararray.count  s     T++rQ   c                     [        XU5      $ )zF
Calls ``bytes.decode`` element-wise.

See Also
--------
char.decode

)r!   r  r   r   s      rO   r!   chararray.decode       df--rQ   c                     [        XU5      $ )zB
Calls `str.encode` element-wise.

See Also
--------
char.encode

)r"   rb  s      rO   r"   chararray.encode	  rd  rQ   c                     [        XX#5      $ )z
Returns a boolean array which is `True` where the string element
in `self` ends with `suffix`, otherwise `False`.

See Also
--------
char.endswith

)r#   )r  r   r   r   s       rO   r#   chararray.endswith	  s     e11rQ   c                 *    [        [        X5      5      $ )z
Return a copy of each string element where all tab characters are
replaced by one or more spaces.

See Also
--------
char.expandtabs

)rE   r$   )r  r   s     rO   r$   chararray.expandtabs	  s     z$011rQ   c                     [        XX#5      $ )zw
For each element, return the lowest index in the string where
substring `sub` is found.

See Also
--------
char.find

)r%   r_  s       rO   r%   chararray.find%	  s     Du**rQ   c                     [        XX#5      $ )zf
Like `find`, but raises `ValueError` when the substring is not found.

See Also
--------
char.index

)r&   r_  s       rO   r&   chararray.index1	  s     T++rQ   c                     [        U 5      $ )z
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'   rY  s    rO   r'   chararray.isalnum<	       t}rQ   c                     [        U 5      $ )z
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(   rY  s    rO   r(   chararray.isalphaI	  rq  rQ   c                     [        U 5      $ )z
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)   rY  s    rO   r)   chararray.isdigitV	       t}rQ   c                     [        U 5      $ )z
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*   rY  s    rO   r*   chararray.islowerb	  rq  rQ   c                     [        U 5      $ )z
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+   rY  s    rO   r+   chararray.isspaceo	  rq  rQ   c                     [        U 5      $ )z
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,   rY  s    rO   r,   chararray.istitle|	  rv  rQ   c                     [        U 5      $ )z
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-   rY  s    rO   r-   chararray.isupper	  rq  rQ   c                     [        X5      $ )zp
Return a string which is the concatenation of the strings in the
sequence `seq`.

See Also
--------
char.join

)r.   )r  r   s     rO   r.   chararray.join	  s     DrQ   c                 ,    [        [        XU5      5      $ )zz
Return an array with the elements of `self` left-justified in a
string of length `width`.

See Also
--------
char.ljust

)rE   r/   r\  s      rO   r/   chararray.ljust	       uT(344rQ   c                 *    [        [        U 5      5      $ )zd
Return an array with the elements of `self` converted to
lowercase.

See Also
--------
char.lower

)rE   r0   rY  s    rO   r0   chararray.lower	       uT{##rQ   c                 *    [        [        X5      5      $ )zp
For each element in `self`, return a copy with the leading characters
removed.

See Also
--------
char.lstrip

)rE   r1   r  r   s     rO   r1   chararray.lstrip	       vd*++rQ   c                 *    [        [        X5      5      $ )zM
Partition each element in `self` around `sep`.

See Also
--------
partition
)rE   r2   r  r   s     rO   r2   chararray.partition	  s     y+,,rQ   c                 ,    [        [        XX#5      5      $ )z
For each element in `self`, return a copy of the string with all
occurrences of substring `old` replaced by `new`.

See Also
--------
char.replace

)rE   r3   )r  r   r   r    s       rO   r3   chararray.replace	  s     wt#566rQ   c                     [        XX#5      $ )z
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

)r4   r_  s       rO   r4   chararray.rfind	  s     T++rQ   c                     [        XX#5      $ )zn
Like `rfind`, but raises `ValueError` when the substring `sub` is
not found.

See Also
--------
char.rindex

)r5   r_  s       rO   r5   chararray.rindex	  s     d,,rQ   c                 ,    [        [        XU5      5      $ )z{
Return an array with the elements of `self`
right-justified in a string of length `width`.

See Also
--------
char.rjust

)rE   r6   r\  s      rO   r6   chararray.rjust	  r  rQ   c                 *    [        [        X5      5      $ )zN
Partition each element in `self` around `sep`.

See Also
--------
rpartition
)rE   r7   r  s     rO   r7   chararray.rpartition 
  s     z$,--rQ   c                     [        XU5      $ )z
For each element in `self`, return a list of the words in
the string, using `sep` as the delimiter string.

See Also
--------
char.rsplit

)r8   r  r   r   s      rO   r8   chararray.rsplit

  s     d**rQ   c                 *    [        [        X5      5      $ )zq
For each element in `self`, return a copy with the trailing
characters removed.

See Also
--------
char.rstrip

)rE   r9   r  s     rO   r9   chararray.rstrip
  r  rQ   c                     [        XU5      $ )z
For each element in `self`, return a list of the words in the
string, using `sep` as the delimiter string.

See Also
--------
char.split

)r:   r  s      rO   r:   chararray.split"
  s     T))rQ   c                     [        X5      $ )z
For each element in `self`, return a list of the lines in the
element, breaking at line boundaries.

See Also
--------
char.splitlines

)r;   )r  r   s     rO   r;   chararray.splitlines.
  s     $))rQ   c                     [        XX#5      $ )z
Returns a boolean array which is `True` where the string element
in `self` starts with `prefix`, otherwise `False`.

See Also
--------
char.startswith

)r<   )r  r   r   r   s       rO   r<   chararray.startswith:
  s     $33rQ   c                 *    [        [        X5      5      $ )z|
For each element in `self`, return a copy with the leading and
trailing characters removed.

See Also
--------
char.strip

)rE   r=   r  s     rO   r=   chararray.stripF
       uT)**rQ   c                 *    [        [        U 5      5      $ )z
For each element in `self`, return a copy of the string with
uppercase characters converted to lowercase and vice versa.

See Also
--------
char.swapcase

)rE   r>   rY  s    rO   r>   chararray.swapcaseR
  s     x~&&rQ   c                 *    [        [        U 5      5      $ )z
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

)rE   r?   rY  s    rO   r?   chararray.title^
  s     uT{##rQ   c                 ,    [        [        XU5      5      $ )a  
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

)rE   r@   )r  r  r  s      rO   r@   chararray.translatek
  s     yk:;;rQ   c                 *    [        [        U 5      5      $ )zd
Return an array with the elements of `self` converted to
uppercase.

See Also
--------
char.upper

)rE   rA   rY  s    rO   rA   chararray.uppery
  r  rQ   c                 *    [        [        X5      5      $ )zp
Return the numeric string left-filled with zeros in a string of
length `width`.

See Also
--------
char.zfill

)rE   rB   )r  r   s     rO   rB   chararray.zfill
  r  rQ   c                     [        U 5      $ )z
For each element in `self`, return True if there are only
numeric characters in the element.

See Also
--------
char.isnumeric

)rC   rY  s    rO   rC   chararray.isnumeric
       rQ   c                     [        U 5      $ )z
For each element in `self`, return True if there are only
decimal characters in the element.

See Also
--------
char.isdecimal

)rD   rY  s    rO   rD   chararray.isdecimal
  r  rQ   ri   )r   FNr   NC)NN r   NNN   rh   )>__name__
__module____qualname____firstlineno____doc__r  r!  r%  r-  r0  r3  r6  r9  r<  r   rA  r   rJ  r   rP  rT  r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   __static_attributes__ri   rQ   rO   r  r    s;   JV CG.1!FN

""&*'$!	)	8	*	*
%;& oo--GO
)	6
,	.	.
2
2
+	,



5
$
,-
7,
-
5.
+
,
*
*
4
+
'$<
$
+

rQ   r  c                 ,   [        U [        [        45      (       aD  Uc  [        U [        5      (       a  SnOSnUc  [        U 5      n[        U 5      U-  n[	        XQUXS9$ [        U [
        [        45      (       a  [        R                  " U 5      n [        U [        5      (       GaY  [        U R                  R                  [        5      (       Ga/  [        U [        5      (       d  U R                  [        5      n Uc:  U R                  n[        U R                  R                  [         5      (       a  US-  nUc.  [        U R                  R                  [         5      (       a  SnOSnU(       a  [         nO["        nUb  [        R                  " XS9n U(       dG  XR                  :w  d8  U(       d  [        U [         5      (       d  U(       a1  [        U ["        5      (       a  U R%                  U['        U5      45      n U $ [        U [        5      (       a<  [        U R                  R                  [(        5      (       a  Uc  U R+                  5       n U(       a  [         nO["        nUc  [-        XUSS9nO[-        XU4USS9nUR                  [        5      $ )a  
Create a `chararray`.

.. note::
   This class is provided for numarray backward-compatibility.
   New code (not concerned with numarray compatibility) should use
   arrays of type `bytes_` or `str_` 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).
TF)rd   r  r  r  rc   r  )rL   r  subok)rH   bytesrI   r&  r  listtuplerK   rE   r   rJ   rL   rM   r   viewrd   r   r   rV   r   objectrT   narray)r   rd   rS   r  r  r  rL   r'  s           rO   r   r   
  s   ~ #s|$$?#s##3xHCH$7 #2 	2 #e}%%mmC #wJsyy~~y$I$I #y))((9%C||H #))..$//Q?#))..$//EE--1C\\)C!6!6ZV44**eS]34C
#wJsyy~~v$F$F **,C SU$?S 1dK88IrQ   c                     [        XSX#S9$ )aK  
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).
F)rS   r  r  r   )r   rd   r  r  s       rO   rE   rE   0  s    b U / /rQ   rh   r  r  r  r  )NTNN)NNN)fr  	functools_utilsr   numerictypesr   r   r   r	   r
   r   r   numericr   r   r   r  numpy.core.multiarrayr   
numpy.corer   numpy.compatr   rK   __all__r  partialarray_function_dispatchrP   r[   ra   rW   rm   r   r   r   r   r   r   rz   r   r   r   r   r   r   r   r   r   r   r    r   r!   r"   r   r#   r   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r   r.   r   r/   r0   r   r1   r   r2   r   r3   r4   r5   r6   r7   r   r8   r9   r:   r   r;   r   r<   r=   r>   r?   r  r@   rA   r  rB   rC   rD   r  rE   ri   rQ   rO   <module>r     sb  "  < < < 0 $ -     
 
#++%%l< 
  ./2 022 ./2 022 ./2 024 ./2 022 ./1 012 ./1 012 -. + / +F ./#M 0#MJ -.+A /+A\ ): *:6 -.#9 /#9L +,1I -1Ih *+*J ,*JZ )**J +*JZ )* J + JF -.(B /(BV /0 > 1 >F *+&: ,&:R *+; ,;D -., /,2 -., /,2 -., /,D -., /,4 -., /,4 -., /,2 -.!, /!,H )*8 +8F )* H + HF -.4 /4D *+3? ,3?l ./ 9 0 9F ,-%P .%PP *+; ,;@ *+< ,<: )* H + HF ./ : 0 :F *+"= ,"=J *+)? ,)?X *+< ,<D /09 19: /0D 1D> *+)H ,)HX -."7 /"7J -.$4 /$4N ./!Q 0!QH -.4 /4D *+? ,?< -.!. /!.H -.". /".J Gd d dN LB BJ L1/ 1/rQ   