
    Kh                     F   S r SSKrSSKrSSKJr  SSKJrJrJ	r	  SSK
JrJrJr  SSKJr  SS	KJr  SS
K7  SSKJrJrJr  SSKJrJrJ r!J"r#  / SQr$\RJ                  " \RL                  SS9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5      S 5       r\" S5      S 5       r\" S5      S 5       r\" S5       " S S\5      5       r.\" S5      SS j5       r\" S5      SS j5       rg) an  
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_	character)ndarrayarrayasarraycompare_chararrays)	overrides)*)multiply	partition
rpartition)_split_rsplit_splitlines_join)5equal	not_equalgreater_equal
less_equalgreaterlessstr_lenaddr   mod
capitalizecentercountdecodeencodeendswith
expandtabsfindindexisalnumisalphaisdigitislowerisspaceistitleisupperjoinljustlowerlstripr   replacerfindrindexrjustr   rsplitrstripsplit
splitlines
startswithstripswapcasetitle	translateupperzfill	isnumeric	isdecimalr
   r   r   	chararrayz
numpy.char)modulec                     X4$ N x1x2s     J/var/www/html/env/lib/python3.13/site-packages/numpy/_core/defchararray.py_binary_op_dispatcherrN   8   s	    8O    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.

Examples
--------
>>> import numpy as np
>>> y = "aa "
>>> x = "aa"
>>> np.char.equal(x, y)
array(True)

See Also
--------
not_equal, greater_equal, less_equal, greater, less
z==Tr   rJ   s     rM   r   r   <       > bdD11rO   c                     [        XSS5      $ )aK  
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

Examples
--------
>>> import numpy as np
>>> x1 = np.array(['a', 'b', 'c'])
>>> np.char.not_equal(x1, 'b')
array([ True, False,  True])

z!=Tr   rJ   s     rM   r   r   ^   rQ   rO   c                     [        XSS5      $ )aN  
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

Examples
--------
>>> import numpy as np
>>> x1 = np.array(['a', 'b', 'c'])
>>> np.char.greater_equal(x1, 'b')
array([False,  True,  True])

z>=Tr   rJ   s     rM   r   r      s    @ bdD11rO   c                     [        XSS5      $ )aL  
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

Examples
--------
>>> import numpy as np
>>> x1 = np.array(['a', 'b', 'c'])
>>> np.char.less_equal(x1, 'b')
array([ True,  True, False])

z<=Tr   rJ   s     rM   r   r      rQ   rO   c                     [        XSS5      $ )aH  
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

Examples
--------
>>> import numpy as np
>>> x1 = np.array(['a', 'b', 'c'])
>>> np.char.greater(x1, 'b')
array([False, False,  True])

>Tr   rJ   s     rM   r   r          > bc400rO   c                     [        XSS5      $ )aG  
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

Examples
--------
>>> import numpy as np
>>> x1 = np.array(['a', 'b', 'c'])
>>> np.char.less(x1, 'b')
array([True, False, False])

<Tr   rJ   s     rM   r   r      rW   rO   c                 L     [        X5      $ ! [         a    [        S5      ef = f)a\  
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, with `np.bytes_` or `np.str_` dtype

i : array_like, with any integer dtype

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

Notes
-----
This is a thin wrapper around np.strings.multiply that raises
`ValueError` when ``i`` is not an integer. It only
exists for backwards-compatibility.

Examples
--------
>>> import numpy as np
>>> a = np.array(["a", "b", "c"])
>>> np.strings.multiply(a, 3)
array(['aaa', 'bbb', 'ccc'], dtype='<U3')
>>> i = np.array([1, 2, 3])
>>> np.strings.multiply(a, i)
array(['a', 'bb', 'ccc'], dtype='<U3')
>>> np.strings.multiply(np.array(['a']), i)
array(['a', 'aa', 'aaa'], dtype='<U3')
>>> a = np.array(['a', 'b', 'c', 'd', 'e', 'f']).reshape((2, 3))
>>> np.strings.multiply(a, 3)
array([['aaa', 'bbb', 'ccc'],
       ['ddd', 'eee', 'fff']], dtype='<U3')
>>> np.strings.multiply(a, i)
array([['a', 'bb', 'ccc'],
       ['d', 'ee', 'fff']], dtype='<U3')

zCan only multiply by integers)strings_multiply	TypeError
ValueError)ais     rM   r   r   	  s.    \:%% :899:s   
 #c                 >    [         R                  " [        X5      SS9$ )a  
Partition each element in `a` around `sep`.

Calls :meth:`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, with ``StringDType``, ``bytes_``, or ``str_`` dtype
    Input array
sep : {str, unicode}
    Separator to split each string element in `a`.

Returns
-------
out : ndarray
    Output array of ``StringDType``, ``bytes_`` or ``str_`` dtype,
    depending on input types. The output array will have an extra
    dimension with 3 elements per input element.

Examples
--------
>>> import numpy as np
>>> x = np.array(["Numpy is nice!"])
>>> np.char.partition(x, " ")
array([['Numpy', ' ', 'is nice!']], dtype='<U8')

See Also
--------
str.partition

axis)npstackstrings_partitionr^   seps     rM   r   r   =  s    N 88%a-B77rO   c                 >    [         R                  " [        X5      SS9$ )a"  
Partition (split) each element around the right-most separator.

Calls :meth:`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, with ``StringDType``, ``bytes_``, or ``str_`` dtype
    Input array
sep : str or unicode
    Right-most separator to split each element in array.

Returns
-------
out : ndarray
    Output array of ``StringDType``, ``bytes_`` or ``str_`` dtype,
    depending on input types. The output array will have an extra
    dimension with 3 elements per input element.

See Also
--------
str.rpartition

Examples
--------
>>> import numpy as np
>>> a = np.array(['aAaAaA', '  aA  ', 'abBABba'])
>>> np.char.rpartition(a, 'A')
array([['aAaAa', 'A', ''],
   ['  a', 'A', '  '],
   ['abB', 'A', 'Bba']], dtype='<U5')

ra   rb   )rd   re   strings_rpartitionrg   s     rM   r   r   g  s    R 88&q.R88rO   c                      \ rS rSrS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 rS rS rS rS rS rS?S jr\R*                  R                  \l        S rS@S jrSAS jrSBS jrSBS jrSAS jrSCS jrSAS jrSAS jrS r S r!S  r"S! r#S" r$S# r%S$ r&S% r'S@S& jr(S' r)SDS( jr*S) r+SDS* jr,SAS+ jr-SAS, jr.S@S- jr/S. r0SBS/ jr1SDS0 jr2SBS1 jr3SDS2 jr4SAS3 jr5SDS4 jr6S5 r7S6 r8SDS7 jr9S8 r:S9 r;S: r<S; r=S<r>g)ErE   i  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` `~numpy.object_`, `~numpy.bytes_` or `~numpy.str_`, and use
   the free functions in the `numpy.char` module for fast vectorized
   string operations.

Versus a NumPy array of dtype `~numpy.bytes_` or `~numpy.str_`, 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 `~numpy.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
--------
>>> import numpy as np
>>> charar = np.char.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.char.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	Uc  [
        R                  " XX4US9n
O[
        R                  " XX4UXVUS9n
U	b  XS'   U
$ )Norder)bufferoffsetstridesrn   .)r   r   int
isinstancestrr	   __new__)subtypeshapeitemsizeunicodero   rp   rq   rn   dtypefillerselfs              rM   ru   chararray.__new__"  s    EE
 x=fc""FFF>??7E3D).0D ??7E3D*0*0).0D IrO   c                 n    UR                   R                  S;   a  UR                  [        U 5      5      $ U$ )NSUbc)rz   charviewtype)r|   arrcontextreturn_scalars       rM   __array_wrap__chararray.__array_wrap__B  s,     99>>V#88DJ''
rO   c                 N    U R                   R                  S;  a  [        S5      eg )NVSUbcz-Can only create a chararray from string data.)rz   r   r]   )r|   objs     rM   __array_finalize__chararray.__array_finalize__J  s#    ::??')LMM *rO   c                 |    [         R                  " X5      n[        U[        5      (       a  UR	                  5       $ U$ rH   )r	   __getitem__rs   r   r9   )r|   r   vals      rM   r   chararray.__getitem__O  s0    !!$,c9%%::<
rO   c                     [        X5      $ )z?
Return (self == other) element-wise.

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

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

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

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

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

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

See Also
--------
add
r   r   s     rM   __add__chararray.__add__  s     4rO   c                     [        X5      $ )z
Return (other + self), that is string concatenation,
element-wise for a pair of array_likes of `bytes_` or `str_`.

See Also
--------
add
r   r   s     rM   __radd__chararray.__radd__  s     5rO   c                 *    [        [        X5      5      $ ze
Return (self * i), that is string multiple concatenation,
element-wise.

See Also
--------
multiply
r   r   r|   r_   s     rM   __mul__chararray.__mul__       x())rO   c                 *    [        [        X5      5      $ r   r   r   s     rM   __rmul__chararray.__rmul__  r   rO   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
)r   r   r   s     rM   __mod__chararray.__mod__  s     s4|$$rO   c                     [         $ rH   )NotImplementedr   s     rM   __rmod__chararray.__rmod__  s    rO   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.char.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|   rc   kindrn   s       rM   r   chararray.argsort  s    $ ~~''E::rO   c                 *    [        [        U 5      5      $ )zx
Return a copy of `self` with only the first character of each element
capitalized.

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

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

See Also
--------
center
)r   r!   r|   widthfillchars      rM   r!   chararray.center  s     vd8455rO   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|   substartends       rM   r"   chararray.count       T++rO   c                     [        XU5      $ )zF
Calls ``bytes.decode`` element-wise.

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

)r#   r|   encodingerrorss      rM   r#   chararray.decode	       df--rO   c                     [        XU5      $ )zH
Calls :meth:`str.encode` element-wise.

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

)r$   r   s      rM   r$   chararray.encode  r   rO   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|   suffixr   r   s       rM   r%   chararray.endswith  s     e11rO   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

)r   r&   )r|   tabsizes     rM   r&   chararray.expandtabs+  s     z$011rO   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       rM   r'   chararray.find7  s     Du**rO   c                     [        XX#5      $ )zk
Like `find`, but raises :exc:`ValueError` when the substring is not
found.

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

)r(   r   s       rM   r(   chararray.indexC  r   rO   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)   r   s    rM   r)   chararray.isalnumO       t}rO   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*   r   s    rM   r*   chararray.isalpha\  r   rO   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+   r   s    rM   r+   chararray.isdigiti       t}rO   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,   r   s    rM   r,   chararray.isloweru  r   rO   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-   r   s    rM   r-   chararray.isspace  r   rO   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.   r   s    rM   r.   chararray.istitle  r   rO   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/   r   s    rM   r/   chararray.isupper  r   rO   c                     [        X5      $ )zp
Return a string which is the concatenation of the strings in the
sequence `seq`.

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

)r0   )r|   seqs     rM   r0   chararray.join  s     DrO   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

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

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

)r   r2   r   s    rM   r2   chararray.lower       uT{##rO   c                     [        X5      $ )zp
For each element in `self`, return a copy with the leading characters
removed.

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

)r3   r|   charss     rM   r3   chararray.lstrip       d""rO   c                 *    [        [        X5      5      $ )zM
Partition each element in `self` around `sep`.

See Also
--------
partition
)r   r   r|   rh   s     rM   r   chararray.partition  s     y+,,rO   c                 ,    [        XX#b  U5      $ S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

ra   )r4   )r|   oldnewr"   s       rM   r4   chararray.replace  s     t#0AuJJrJJrO   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

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

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

)r6   r   s       rM   r6   chararray.rindex  s     d,,rO   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

)r   r7   r   s      rM   r7   chararray.rjust  r   rO   c                 *    [        [        X5      5      $ )zN
Partition each element in `self` around `sep`.

See Also
--------
rpartition
)r   r   r  s     rM   r   chararray.rpartition  s     z$,--rO   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|   rh   maxsplits      rM   r8   chararray.rsplit  s     d**rO   c                     [        X5      $ )zq
For each element in `self`, return a copy with the trailing
characters removed.

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

)r9   r   s     rM   r9   chararray.rstrip)  r   rO   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      rM   r:   chararray.split5  s     T))rO   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|   keependss     rM   r;   chararray.splitlinesA  s     $))rO   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|   prefixr   r   s       rM   r<   chararray.startswithM  s     $33rO   c                     [        X5      $ )z|
For each element in `self`, return a copy with the leading and
trailing characters removed.

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

)r=   r   s     rM   r=   chararray.stripY  s     T!!rO   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

)r   r>   r   s    rM   r>   chararray.swapcasee  s     x~&&rO   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

)r   r?   r   s    rM   r?   chararray.titleq  s     uT{##rO   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

)r   r@   )r|   tabledeletecharss      rM   r@   chararray.translate~  s     yk:;;rO   c                 *    [        [        U 5      5      $ )zd
Return an array with the elements of `self` converted to
uppercase.

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

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

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

)r   rB   )r|   r   s     rM   rB   chararray.zfill  s     uT)**rO   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   r   s    rM   rC   chararray.isnumeric       rO   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   r   s    rM   rD   chararray.isdecimal  r.  rO   rI   )r   FNr   NC)NF)ra   NN) )r   N)NN)   rH   )?__name__
__module____qualname____firstlineno____doc__ru   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-   r.   r/   r0   r1   r2   r3   r   r4   r5   r6   r7   r   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   __static_attributes__rI   rO   rM   rE   rE     sA   LZ CG.1@N
"&*'$!	 	 	*	*
%;& oo--GO
)	6
,	.	.
2
2
+
,



5
$
#-
K,
-
5.
+
#
*
*
4
"
'$<
$
+

rO   rE   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  [        U 5      n [        U [        5      (       GaN  [        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	  [        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 `~numpy.char.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` for fast vectorized string operations instead.

Versus a NumPy array of dtype `bytes_` or `str_`, 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. `chararray.endswith <numpy.char.chararray.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 `~numpy.char.chararray` can contain Unicode
    characters, when false only 8-bit characters.  If unicode is
    None and `obj` is one of the following:

    - a `~numpy.char.chararray`,
    - an ndarray of type :class:`str_` or :class:`bytes_`
    - a Python :class:`str` or :class:`bytes` 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).

Examples
--------

>>> import numpy as np
>>> char_array = np.char.array(['hello', 'world', 'numpy','array'])
>>> char_array
chararray(['hello', 'world', 'numpy', 'array'], dtype='<U5')

TF)rx   ry   ro   rn      rm   )rz   rn   subok)rs   bytesrt   lenrE   listtupleasnarrayr	   
issubclassrz   r   r   r   rx   r   r   astyperr   objecttolistnarray)r   rx   copyry   rn   rw   rz   r   s           rM   r
   r
     s   P #s|$$?#s##3xHCH$7 #2 	2 #e}%%sm#wJsyy~~y$I$I #y))((9%C||H #))..$//Q?#))..$//EE3,C\\)C!6!6ZV44**eS]34C
#wJsyy~~v$F$F **,C SU$?S 1dK88IrO   c                     [        XSX#S9$ )a   
Convert the input to a `~numpy.char.chararray`, copying the data only if
necessary.

Versus a NumPy array of dtype `bytes_` or `str_`, 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. `chararray.endswith <numpy.char.chararray.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 `~numpy.char.chararray` can contain Unicode
    characters, when false only 8-bit characters.  If unicode is
    None and `obj` is one of the following:

    - a `~numpy.char.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).

Examples
--------
>>> import numpy as np
>>> np.char.asarray(['hello', 'world'])
chararray(['hello', 'world'], dtype='<U5')

F)rG  ry   rn   )r
   )r   rx   ry   rn   s       rM   r   r   L  s    r U / /rO   )NTNN)NNN)/r8  	functoolsnumpyrd   _utilsr   numerictypesr   r   r   numericr	   r
   rF  r   rA  numpy._core.multiarrayr   numpy._corer   numpy.stringsr   r[   r   rf   r   rj   numpy._core.stringsr   r:   r   r8   r   r;   r   r0   __all__partialarray_function_dispatchrN   r   r   r   r   r   r   rE   rI   rO   rM   <module>rU     s  "    1 1 B B 5 !  
 
 $++%%l<  ./2 02B ./2 02B ./2 02D ./2 02B ./1 01B ./1 01B L0: 0:f L&8 &8R L(9 (9V Lf f fR LK K\ L9/ 9/rO   