Ñò
*ÏÐKc        ;   @   sn  d  Z  d d k Z d d k l Z l Z l Z l Z l Z l Z d d k	 l
 Z
 l Z d d k	 l Z d d k l Z d d k Z d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; g5 Z d< a e Z e Z d= „  Z d> „  Z d? „  Z d@ „  Z dA „  Z dB „  Z dC „  Z dD „  Z dE „  Z dF „  Z  dG „  Z! dH „  Z" dI „  Z# dJ „  Z$ dK „  Z% e i& dL dM f j o dN dO „ Z' n
 dP „  Z' d< e( dQ „ Z) e( e( dR „ Z* e( e( dS „ Z+ d< e( dT „ Z, dU dV „ Z- d< e( dW „ Z. d< e( dX „ Z/ dY „  Z0 dZ „  Z1 d[ „  Z2 d\ „  Z3 d] „  Z4 d^ „  Z5 d_ „  Z6 d` „  Z7 e i& dL dM f j o dN da „ Z8 n
 db „  Z8 dc „  Z9 e( dd „ Z: e i& dL de f j o df „  Z; n e( dg „ Z< d< e( dh „ Z= d< e( di „ Z> e i& dL dM f j o dN dj „ Z? n
 dk „  Z? e i& dL de f j o dl „  Z@ n e i& dL dM f j o e( e( dm „ ZA n e( dn „ ZB e( e( do „ ZC e( dp „ ZD d< e( dq „ ZE e( dr „ ZF ds „  ZG dt „  ZH e( du „ ZI dv „  ZJ dw „  ZK dx „  ZL dy „  ZM d e
 f dz „  ƒ  YZN e( eO e( e( d{ „ Z e( e( e( d| „ ZP d S(}   sB  
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. If one needs
   arrays of strings, use arrays of `dtype` `object_`, `string_` or
   `unicode_`, and use the free functions in the `numpy.char` module
   for fast vectorized string operations.

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

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

iÿÿÿÿN(   t   string_t   unicode_t   integert   object_t   bool_t	   character(   t   ndarrayt   compare_chararrays(   t   array(   t   _vec_stringt	   chararrayt   equalt	   not_equalt   greater_equalt
   less_equalt   greatert   lesst   str_lent   addt   multiplyt   modt
   capitalizet   centert   countt   decodet   encodet   endswitht
   expandtabst   findt   formatt   indext   isalnumt   isalphat   isdigitt   islowert   isspacet   istitlet   isuppert   joint   ljustt   lowert   lstript	   partitiont   replacet   rfindt   rindext   rjustt
   rpartitiont   rsplitt   rstript   splitt
   splitlinest
   startswitht   stript   swapcaset   titlet	   translatet   uppert   zfillt	   isnumerict	   isdecimalR   t   asarrayi    c          G   sI   xB |  D]: } t  | t ƒ p t t i | ƒ i i t ƒ o t Sq Wt S(   s½   
    Helper function for determining the output type of some string
    operations.

    For an operation on two ndarrays, if at least one is unicode, the
    result should be unicode.
    (	   t
   isinstancet   _unicodet
   issubclasst   numpyR=   t   dtypet   typeR   R    (   t   argst   x(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   _use_unicode*   s     	c         C   s   t  i |  i ƒ  ƒ S(   s†   
    Helper function to cast a result back into a string or unicode array
    if an object array must be used as an intermediary.
    (   RA   R=   t   tolist(   t   result(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   _to_string_or_unicode_array8   s    c          G   s:   g  } x- |  D]% } | d j o Pn | i | ƒ q W| S(   s#  
    Helper function for delegating arguments to Python string
    functions.

    Many of the Python string operations that have optional arguments
    do not use 'None' to indicate a default value.  In these cases,
    we need to remove all `None` arguments, and those following them.
    N(   t   Nonet   append(   RD   t   newargst   chk(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   _clean_args?   s    	 c         C   s)   t  |  i i t ƒ o |  i d S|  i S(   sÀ   
    Helper function that returns the number of characters per field in
    a string or unicode array.  This is to abstract out the fact that
    for a unicode array this is itemsize / 4.
    i   (   R@   RB   RC   R   t   itemsize(   t   a(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   _get_num_charsO   s    c         C   s   t  |  | d t ƒ S(   s4  
    Return (x1 == x2) element-wise.

    Unlike `numpy.equal`, this comparison is performed by first
    stripping whitespace characters from the end of the string.  This
    behavior is provided for backward-compatibility with numarray.

    Parameters
    ----------
    x1, x2 : array_like of str or unicode
        Input arrays of the same shape.

    Returns
    -------
    out : {ndarray, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    not_equal, greater_equal, less_equal, greater, less
    s   ==(   R   t   True(   t   x1t   x2(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Z   s    c         C   s   t  |  | d t ƒ S(   s4  
    Return (x1 != x2) element-wise.

    Unlike `numpy.not_equal`, this comparison is performed by first
    stripping whitespace characters from the end of the string.  This
    behavior is provided for backward-compatibility with numarray.

    Parameters
    ----------
    x1, x2 : array_like of str or unicode
        Input arrays of the same shape.

    Returns
    -------
    out : {ndarray, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, greater_equal, less_equal, greater, less
    s   !=(   R   RR   (   RS   RT   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   r   s    c         C   s   t  |  | d t ƒ S(   s7  
    Return (x1 >= x2) element-wise.

    Unlike `numpy.greater_equal`, this comparison is performed by
    first stripping whitespace characters from the end of the string.
    This behavior is provided for backward-compatibility with
    numarray.

    Parameters
    ----------
    x1, x2 : array_like of str or unicode
        Input arrays of the same shape.

    Returns
    -------
    out : {ndarray, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, less_equal, greater, less
    s   >=(   R   RR   (   RS   RT   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Š   s    c         C   s   t  |  | d t ƒ S(   s4  
    Return (x1 <= x2) element-wise.

    Unlike `numpy.less_equal`, this comparison is performed by first
    stripping whitespace characters from the end of the string.  This
    behavior is provided for backward-compatibility with numarray.

    Parameters
    ----------
    x1, x2 : array_like of str or unicode
        Input arrays of the same shape.

    Returns
    -------
    out : {ndarray, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, greater_equal, greater, less
    s   <=(   R   RR   (   RS   RT   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   £   s    c         C   s   t  |  | d t ƒ S(   s3  
    Return (x1 > x2) element-wise.

    Unlike `numpy.greater`, this comparison is performed by first
    stripping whitespace characters from the end of the string.  This
    behavior is provided for backward-compatibility with numarray.

    Parameters
    ----------
    x1, x2 : array_like of str or unicode
        Input arrays of the same shape.

    Returns
    -------
    out : {ndarray, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, greater_equal, less_equal, less
    t   >(   R   RR   (   RS   RT   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   »   s    c         C   s   t  |  | d t ƒ S(   s6  
    Return (x1 < x2) element-wise.

    Unlike `numpy.greater`, this comparison is performed by first
    stripping whitespace characters from the end of the string.  This
    behavior is provided for backward-compatibility with numarray.

    Parameters
    ----------
    x1, x2 : array_like of str or unicode
        Input arrays of the same shape.

    Returns
    -------
    out : {ndarray, bool}
        Output array of bools, or a single bool if x1 and x2 are scalars.

    See Also
    --------
    equal, not_equal, greater_equal, less_equal, greater
    t   <(   R   RR   (   RS   RT   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Ó   s    c         C   s   t  |  t d ƒ S(   sä   
    Return len(a) element-wise.

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

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

    See also
    --------
    __builtin__.len
    t   __len__(   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ë   s    c         C   s_   t  i |  ƒ } t  i | ƒ } t | ƒ t | ƒ } t | | ƒ } t | | | f d | f ƒ S(   sS  
    Return (x1 + x2), that is string concatenation, element-wise for a
    pair of array_likes of str or unicode.

    Parameters
    ----------
    x1 : array_like of str or unicode
    x2 : array_like of str or unicode

    Returns
    -------
    out : ndarray
        Output array of string_ or unicode_, depending on input types
    t   __add__(   RA   R=   RQ   RF   R	   (   RS   RT   t   arr1t   arr2t   out_sizeRB   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   þ   s
    c         C   sˆ   t  i |  ƒ } t  i | ƒ } t | i i t ƒ p t d ‚ n t | ƒ t t	 | i ƒ  ƒ d ƒ } t
 | | i i | f d | f ƒ S(   sv  
    Return (a * i), that is string multiple concatenation,
    element-wise.

    Values in `i` of less than 0 are treated as 0 (which yields an
    empty string).

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

    i : array_like of ints

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

    s   Can only multiply by integersi    t   __mul__(   RA   R=   R@   RB   RC   R   t
   ValueErrorRQ   t   maxt   longR	   (   RP   t   it   a_arrt   i_arrR[   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR     s    %c         C   s   t  t |  t d | f ƒ ƒ S(   sÚ  
    Return (a % i), that is pre-Python 2.6 string formatting
    (iterpolation), element-wise for a pair of array_likes of str
    or unicode.

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

    values : array_like of values
       These values will be element-wise interpolated into the string.

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

    See also
    --------
    str.__mod__

    t   __mod__(   RI   R	   R   (   RP   t   values(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   /  s    c         C   s"   t  i |  ƒ } t | | i d ƒ S(   s  
    Return a copy of `a` with only the first character of each element
    capitalized.

    Calls `str.capitalize` element-wise.

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

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

    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   (   RA   R=   R	   RB   (   RP   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   I  s     i   i   t    c         C   s[   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | | f ƒ S(   sO  
        Return a copy of `a` with its elements centered in a string of
        length `width`.

        Calls `str.center` element-wise.

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

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

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

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

        R   (   RA   R=   R_   R^   t   flatR	   RB   RC   (   RP   t   widtht   fillcharRa   t	   width_arrt   size(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   m  s
    c         C   sX   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | f ƒ S(   sè  
        Return an array with the elements of `a` centered in a string
        of length width.

        Calls `str.center` element-wise.

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

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

        See also
        --------
        str.center
        R   (   RA   R=   R_   R^   Rf   R	   RB   RC   (   RP   Rg   Ra   Ri   Rj   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Ž  s
    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   s¼  
    Returns an array with the number of non-overlapping occurrences of
    substring `sub` in the range [`start`, `end`].

    Calls `str.count` element-wise.

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

    sub : str or unicode
       The substring to search for.

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

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

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

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

    R   (   R	   R   RN   (   RP   t   subt   startt   end(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ª  s    +c         C   s"   t  t |  t d t | | ƒ ƒ ƒ S(   sƒ  
    Calls `str.decode` element-wise.

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

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

    encoding : str, optional
       The name of an encoding

    errors : str, optional
       Specifies how to handle encoding errors

    Returns
    -------
    out : ndarray

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

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

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

    R   (   RI   R	   R   RN   (   RP   t   encodingt   errors(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ×  s    *c         C   s"   t  t |  t d t | | ƒ ƒ ƒ S(   sA  
    Calls `str.encode` element-wise.

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

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

    encoding : str, optional
       The name of an encoding

    errors : str, optional
       Specifies how to handle encoding errors

    Returns
    -------
    out : ndarray

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

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

    R   (   RI   R	   R   RN   (   RP   Rn   Ro   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR     s    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   sN  
    Returns a boolean array which is `True` where the string element
    in `a` ends with `suffix`, otherwise `False`.

    Calls `str.endswith` element-wise.

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

    suffix : str

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

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

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

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

    R   (   R	   R   RN   (   RP   t   suffixRl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   &  s    (i   c         C   s   t  t |  t d | f ƒ ƒ S(   s"  
    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. If `tabsize` is not given, a
    tab size of 8 characters is assumed. This doesn't understand other
    non-printing characters or escape sequences.

    Parameters
    ----------
    a : array_like of str or unicode
    tabsize : int, optional

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

    See also
    --------
    str.expandtabs
    R   (   RI   R	   R   (   RP   t   tabsize(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Q  s    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   sŸ  
    For each element, return the lowest index in the string where
    substring `sub` is found.

    Calls `str.find` element-wise.

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

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

    sub : str or unicode

    start, end : int, optional
        Optional arguments `start` and `end` are interpreted as in
        slice notation.

    Returns
    -------
    out : ndarray or int
        Output array of ints.  Returns -1 if `sub` is not found.

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

    R   (   R	   R   RN   (   RP   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   p  s    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   s  
    Like `find`, but raises `ValueError` when the substring is not found.

    Calls `str.index` element-wise.

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

    sub : str or unicode

    start, end : int, optional

    Returns
    -------
    out : ndarray
        Output array of ints.  Returns -1 if `sub` is not found.

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

    R   (   R	   R   RN   (   RP   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   —  s    c         C   s   t  |  t d ƒ S(   sÌ  
    Returns true for each element if all characters in the string are
    alphanumeric and there is at least one character, false otherwise.

    Calls `str.isalnum` element-wise.

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

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

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

    See also
    --------
    str.isalnum
    R   (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ²  s    c         C   s   t  |  t d ƒ S(   s¨  
    Returns true for each element if all characters in the string are
    alphabetic and there is at least one character, false otherwise.

    Calls `str.isalpha` element-wise.

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

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

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

    See also
    --------
    str.isalpha
    R    (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR    Ê  s    c         C   s   t  |  t d ƒ S(   s¤  
    Returns true for each element if all characters in the string are
    digits and there is at least one character, false otherwise.

    Calls `str.isdigit` element-wise.

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

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

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

    See also
    --------
    str.isdigit
    R!   (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR!   â  s    c         C   s   t  |  t d ƒ S(   s·  
    Returns true for each element if all cased characters in the
    string are lowercase and there is at least one cased character,
    false otherwise.

    Calls `str.islower` element-wise.

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

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

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

    See also
    --------
    str.islower
    R"   (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR"   ú  s    c         C   s   t  |  t d ƒ S(   s³  
    Returns true for each element if there are only whitespace
    characters in the string and there is at least one character,
    false otherwise.

    Calls `str.isspace` element-wise.

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

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

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

    See also
    --------
    str.isspace
    R#   (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR#     s    c         C   s   t  |  t d ƒ S(   sž  
    Returns true for each element if the element is a titlecased
    string and there is at least one character, false otherwise.

    Call `str.istitle` element-wise.

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

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

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

    See also
    --------
    str.istitle
    R$   (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR$   ,  s    c         C   s   t  |  t d ƒ S(   s°  
    Returns true for each element if all cased characters in the
    string are uppercase and there is at least one character, false
    otherwise.

    Call `str.isupper` element-wise.

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

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

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

    See also
    --------
    str.isupper
    R%   (   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR%   D  s    c         C   s   t  t |  t d | f ƒ ƒ S(   sƒ  
    Return a string which is the concatenation of the strings in the
    sequence `seq`.

    Calls `str.join` element-wise.

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

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

    See also
    --------
    str.join
    R&   (   RI   R	   R   (   t   sept   seq(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR&   ]  s    c         C   s[   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | | f ƒ S(   s8  
        Return an array with the elements of `a` left-justified in a
        string of length `width`.

        Calls `str.ljust` element-wise.

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

        width : int
            The length of the resulting strings
        fillchar : str or unicode, optional
            The character to use for padding

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

        See also
        --------
        str.ljust

        R'   (   RA   R=   R_   R^   Rf   R	   RB   RC   (   RP   Rg   Rh   Ra   Ri   Rj   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR'   v  s
    c         C   sX   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | f ƒ S(   sÝ  
        Return an array with the elements of `a` left-justified in a
        string of length `width`.

        Calls `str.ljust` element-wise.

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

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

        See also
        --------
        str.ljust
        R'   (   RA   R=   R_   R^   Rf   R	   RB   RC   (   RP   Rg   Ra   Ri   Rj   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR'   –  s
    c         C   s"   t  i |  ƒ } t | | i d ƒ S(   sn  
    Return an array with the elements of `a` converted to lowercase.

    Call `str.lower` element-wise.

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

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

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

    See also
    --------
    str.lower

    Examples
    --------
    >>> c = np.array(['A1B C', '1BCA', 'BCA1']); c
    array(['A1B C', '1BCA', 'BCA1'],
          dtype='|S5')
    >>> np.char.lower(c)
    array(['a1b c', '1bca', 'bca1'],
          dtype='|S5')
    R(   (   RA   R=   R	   RB   (   RP   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR(   ²  s    c         C   s(   t  i |  ƒ } t | | i d | f ƒ S(   sØ  
    For each element in `a`, return a copy with the leading characters
    removed.

    Calls `str.lstrip` element-wise.

    Parameters
    ----------
    a : array-like 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; rather, all combinations of its values are
       stripped.

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

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

    Examples
    --------
    >>> c = np.array(['aAaAaA', '  aA  ', 'abBABba'])
    >>> c
    array(['aAaAaA', '  aA', 'abBABba'],
        dtype='|S7')
    >>> np.char.lstrip(c, 'a') # 'a' unstripped from c[1] because whitespace leading
    array(['AaAaA', '  aA', 'bBABba'],
        dtype='|S6')
    >>> np.char.lstrip(c, 'A') # leaves c unchanged
    array(['aAaAaA', '  aA', 'abBABba'],
        dtype='|S7')
    >>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, '')).all()
    True
    >>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, None)).all()
    True

    R)   (   RA   R=   R	   RB   (   RP   t   charsRa   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR)   Ó  s    -i   c         C   s   t  t |  t d | f ƒ ƒ S(   sO  
        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 of str or unicode
        sep : str or unicode

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

        See also
        --------
        str.partition
        R*   (   RI   R	   R   (   RP   Rr   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR*     s    c         C   s)   t  t |  t d | | g t | ƒ ƒ ƒ S(   s%  
    For each element in `a`, return a copy of the string with all
    occurrences of substring `old` replaced by `new`.

    Calls `str.replace` element-wise.

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

    old, new : str or unicode

    count : int, optional
        If the optional argument `count` is given, only the first
        `count` occurrences are replaced.

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

    See also
    --------
    str.replace

    R+   (   RI   R	   R   RN   (   RP   t   oldt   newR   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR+   #  s    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   s.  
    For each element in `a`, return the highest index in the string
    where substring `sub` is found, such that `sub` is contained
    within [`start`, `end`].

    Calls `str.rfind` element-wise.

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

    sub : str or unicode

    start, end : int, optional
        Optional arguments `start` and `end` are interpreted as in
        slice notation.

    Returns
    -------
    out : ndarray
       Output array of ints.  Return -1 on failure.

    See also
    --------
    str.rfind

    R,   (   R	   R   RN   (   RP   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR,   B  s    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   sx  
    Like `rfind`, but raises `ValueError` when the substring `sub` is
    not found.

    Calls `str.rindex` element-wise.

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

    sub : str or unicode

    start, end : int, optional

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

    See also
    --------
    rfind, str.rindex

    R-   (   R	   R   RN   (   RP   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR-   a  s    c         C   s[   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | | f ƒ S(   s9  
        Return an array with the elements of `a` right-justified in a
        string of length `width`.

        Calls `str.rjust` element-wise.

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

        width : int
            The length of the resulting strings
        fillchar : str or unicode, optional
            The character to use for padding

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

        See also
        --------
        str.rjust

        R.   (   RA   R=   R_   R^   Rf   R	   RB   RC   (   RP   Rg   Rh   Ra   Ri   Rj   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR.   ~  s
    c         C   sX   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | f ƒ S(   sÞ  
        Return an array with the elements of `a` right-justified in a
        string of length `width`.

        Calls `str.rjust` element-wise.

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

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

        See also
        --------
        str.rjust
        R.   (   RA   R=   R_   R^   Rf   R	   RB   RC   (   RP   Rg   Ra   Ri   Rj   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR.   ž  s
    c         C   s   t  t |  t d | f ƒ ƒ S(   sT  
        Partition each element in `a` around `sep`.

        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
        sep : str or unicode

        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
        R/   (   RI   R	   R   (   RP   Rr   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR/   »  s    c         C   s    t  |  t d | g t | ƒ ƒ S(   sú  
        For each element in `a`, return a list of the words in the
        string, using `sep` as the delimiter string.

        Calls `str.rsplit` element-wise.

        Except for splitting from the right, `rsplit`
        behaves like `split`.

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

        sep : str or unicode, optional
            If `sep` is not specified or `None`, any whitespace string
            is a separator.
        maxsplit : int, optional
            If `maxsplit` is given, at most `maxsplit` splits are done,
            the rightmost ones.

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

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

        R0   (   R	   R   RN   (   RP   Rr   t   maxsplit(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR0   Û  s    !c         C   s(   t  i |  ƒ } t | | i d | f ƒ S(   sÍ  
    For each element in `a`, return a copy with the trailing
    characters removed.

    Calls `str.rstrip` element-wise.

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

    chars : str or unicode, optional
       The `chars` argument is a string specifying the set of
       characters to be removed. If omitted or None, the `chars`
       argument defaults to removing whitespace. The `chars` argument
       is not a suffix; rather, all combinations of its values are
       stripped.

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

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

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

    R1   (   RA   R=   R	   RB   (   RP   Rt   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR1   ÿ  s    (c         C   s    t  |  t d | g t | ƒ ƒ S(   s9  
    For each element in `a`, return a list of the words in the
    string, using `sep` as the delimiter string.

    Calls `str.rsplit` element-wise.

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

    sep : str or unicode, optional
       If `sep` is not specified or `None`, any whitespace string is a
       separator.

    maxsplit : int, optional
        If `maxsplit` is given, at most `maxsplit` splits are done.

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

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

    R2   (   R	   R   RN   (   RP   Rr   Rw   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR2   *  s    c         C   s   t  |  t d t | ƒ ƒ S(   sÙ  
    For each element in `a`, return a list of the lines in the
    element, breaking at line boundaries.

    Calls `str.splitlines` element-wise.

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

    keepends : bool, optional
        Line breaks are not included in the resulting list unless
        keepends is given and true.

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

    See also
    --------
    str.splitlines

    R3   (   R	   R   RN   (   RP   t   keepends(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR3   K  s    c         C   s#   t  |  t d | | g t | ƒ ƒ S(   s  
    Returns a boolean array which is `True` where the string element
    in `a` starts with `prefix`, otherwise `False`.

    Calls `str.startswith` element-wise.

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

    suffix : str

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

    Returns
    -------
    out : ndarray
        Array of booleans

    See also
    --------
    str.startswith

    R4   (   R	   R   RN   (   RP   t   prefixRl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR4   g  s    c         C   s+   t  i |  ƒ } t | | i d t | ƒ ƒ S(   s½  
    For each element in `a`, return a copy with the leading and
    trailing characters removed.

    Calls `str.rstrip` element-wise.

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

    chars : str or unicode, optional
       The `chars` argument is a string specifying the set of
       characters to be removed. If omitted or None, the `chars`
       argument defaults to removing whitespace. The `chars` argument
       is not a prefix or suffix; rather, all combinations of its
       values are stripped.

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

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

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

    R5   (   RA   R=   R	   RB   RN   (   RP   Rt   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR5   …  s    ,c         C   s"   t  i |  ƒ } t | | i d ƒ S(   s»  
    For each element in `a`, return 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 of str or unicode

    Returns
    -------
    out : ndarray
        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')
    R6   (   RA   R=   R	   RB   (   RP   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR6   ´  s    c         C   s"   t  i |  ƒ } t | | i d ƒ S(   sÝ  
    For each element in `a`, return a titlecased version of the
    string: 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 of str or unicode

    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)
    chararray(['A1B C', '1B Ca', 'B Ca1', 'Ca1B'],
        dtype='|S5')
    R7   (   RA   R=   R	   RB   (   RP   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR7   Ö  s     c         C   sf   t  i |  ƒ } t | i i t ƒ o t | | i d | f ƒ St | | i d | g t | ƒ ƒ Sd S(   s,  
    For each element in `a`, return a copy of the string where all
    characters occurring in the optional argument `deletechars` are
    removed, and the remaining characters have been mapped through the
    given translation table.

    Calls `str.translate` element-wise.

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

    table : str of length 256

    deletechars : str

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

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

    R8   N(   RA   R=   R@   RB   RC   R   R	   RN   (   RP   t   tablet   deletecharsRa   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR8   ù  s    c         C   s"   t  i |  ƒ } t | | i d ƒ S(   s^  
    Return an array with the elements of `a` converted to uppercase.

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

    Examples
    --------
    >>> c = np.array(['a1b c', '1bca', 'bca1']); c
    array(['a1b c', '1bca', 'bca1'],
        dtype='|S5')
    >>> numpy.char.upper(c)
    array(['A1B C', '1BCA', 'BCA1'],
        dtype='|S5')
    R9   (   RA   R=   R	   RB   (   RP   Ra   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR9     s    c         C   sX   t  i |  ƒ } t  i | ƒ } t t  i | i ƒ ƒ } t | | i i | f d | f ƒ S(   sj  
    Return the numeric string left-filled with zeros in a string of
    length `width`.

    Calls `str.zfill` element-wise.

    Parameters
    ----------
    a : array-like of str or unicode
    width : int

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

    See also
    --------
    str.zfill
    R:   (   RA   R=   R_   R^   Rf   R	   RB   RC   (   RP   Rg   Ra   Ri   Rj   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR:   =  s
    c         C   s0   t  |  ƒ t j o t d ‚ n t |  t d ƒ S(   sî  
    For each element in `a`, return True if there are only numeric
    characters in the element.

    Calls `unicode.isnumeric` element-wise.

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

    Parameters
    ----------
    a : array-like of unicode

    Returns
    -------
    out : ndarray
        Array of booleans

    See also
    --------
    unicode.isnumeric
    s:   isnumeric is only available for Unicode strings and arraysR;   (   RF   R   t	   TypeErrorR	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR;   X  s    c         C   s0   t  |  ƒ t j o t d ‚ n t |  t d ƒ S(   só  
    For each element in `a`, return True if there are only decimal
    characters in the element.

    Calls `unicode.isdecimal` element-wise.

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

    Parameters
    ----------
    a : array-like of unicode

    Returns
    -------
    out : ndarray
        Array of booleans

    See also
    --------
    unicode.isdecimal
    s:   isnumeric is only available for Unicode strings and arraysR<   (   RF   R   R|   R	   R   (   RP   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR<   t  s    c           B   s  e  Z d  Z d e dE d dE d d „ Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d d dE d „ Z e i i e _ d „  Z e i dF j o d d „ Z n
 d „  Z d dE d „ Z dE dE d „ Z dE dE d „ Z d dE d „ Z d  d! „ Z d dE d" „ Z d dE d# „ Z  d$ „  Z! d% „  Z" d& „  Z# d' „  Z$ d( „  Z% d) „  Z& d* „  Z' d+ „  Z( e i dG j o d d, „ Z) n
 d- „  Z) d. „  Z* dE d/ „ Z+ e i dH j o d1 „  Z, n dE d2 „ Z- d dE d3 „ Z. d dE d4 „ Z/ e i dI j o d d5 „ Z0 n
 d6 „  Z0 e i dJ j o d7 „  Z1 n e i dK j o dE dE d8 „ Z2 n dE d9 „ Z3 dE dE d: „ Z4 dE d; „ Z5 d dE d< „ Z6 dE d= „ Z7 d> „  Z8 d? „  Z9 dE d@ „ Z: dA „  Z; dB „  Z< dC „  Z= dD „  Z> RS(L   sê
  
    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. If one needs
       arrays of strings, use arrays of `dtype` `object_`, `string_` or
       `unicode_`, and use the free functions in the `numpy.char` module
       for fast vectorized string operations.

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

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

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

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

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

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

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

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

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

    i   i    t   Cc   
      C   s˜   | o
 t  } n t } t | ƒ } d a | d  j o% t i |  | | | f d | ƒ}	 n4 t i |  | | | f d | d | d | d | ƒ}	 d a |	 S(   Ni   t   ordert   buffert   offsett   stridesi    (   R   R    R_   t
   _globalvarRJ   R   t   __new__(
   t   subtypet   shapeRO   t   unicodeR   R€   R   R~   RB   t   self(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyRƒ   Þ  s    
	c         C   s,   t  o  |  i i d j o t d ‚ n d  S(   Nt   SUbcs-   Can only create a chararray from string data.(   R‚   RB   t   charR]   (   R‡   t   obj(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __array_finalize__ø  s    c         C   s_   t  i |  | ƒ } t | i i t ƒ o3 | i ƒ  } t | ƒ d j o
 d } q[ | } n | S(   Ni    t    (   R   t   __getitem__R@   RB   RC   R   R1   t   _len(   R‡   RŠ   t   valt   temp(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ý  s    

c         C   s   t  |  | ƒ S(   sg   
        Return (self == other) element-wise.

        See also
        --------
        equal
        (   R   (   R‡   t   other(    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __eq__  s    c         C   s   t  |  | ƒ S(   sk   
        Return (self != other) element-wise.

        See also
        --------
        not_equal
        (   R   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __ne__  s    c         C   s   t  |  | ƒ S(   so   
        Return (self >= other) element-wise.

        See also
        --------
        greater_equal
        (   R   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __ge__   s    c         C   s   t  |  | ƒ S(   sl   
        Return (self <= other) element-wise.

        See also
        --------
        less_equal
        (   R   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __le__*  s    c         C   s   t  |  | ƒ S(   sh   
        Return (self > other) element-wise.

        See also
        --------
        greater
        (   R   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __gt__4  s    c         C   s   t  |  | ƒ S(   se   
        Return (self < other) element-wise.

        See also
        --------
        less
        (   R   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __lt__>  s    c         C   s   t  t |  | ƒ ƒ S(   s·   
        Return (self + other), that is string concatenation,
        element-wise for a pair of array_likes of str or unicode.

        See also
        --------
        add
        (   R=   R   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyRX   H  s    	c         C   s   t  t t i  | ƒ |  ƒ ƒ S(   s¼   
        Return (other + self), that is string concatenation,
        element-wise for a pair of array_likes of string_ or unicode_.

        See also
        --------
        add
        (   R=   R   RA   (   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __radd__S  s    	c         C   s   t  t |  | ƒ ƒ S(   s•   
        Return (self * i), that is string multiple concatenation,
        element-wise.

        See also
        --------
        multiply
        (   R=   R   (   R‡   R`   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR\   ^  s    	c         C   s   t  t |  | ƒ ƒ S(   s•   
        Return (self * i), that is string multiple concatenation,
        element-wise.

        See also
        --------
        multiply
        (   R=   R   (   R‡   R`   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __rmul__i  s    	c         C   s   t  t |  | ƒ ƒ S(   sÛ   
        Return (self % i), that is pre-Python 2.6 string formatting
        (iterpolation), element-wise for a pair of array_likes of string_
        or unicode_.

        See also
        --------
        mod
        (   R=   R   (   R‡   R`   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyRc   t  s    
c         C   s   t  S(   N(   t   NotImplemented(   R‡   R‘   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   __rmod__€  s    iÿÿÿÿt	   quicksortc         C   s   |  i  ƒ  i | | | ƒ S(   s  
        Return the indices that sort the array lexicographically.

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

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

        (   t	   __array__t   argsort(   R‡   t   axist   kindR~   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyRž   ƒ  s    c         C   s   t  t |  ƒ ƒ S(   s¨   
        Return a copy of `self` with only the first character of each element
        capitalized.

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

        (   R=   R   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ˜  s    
i   i   Re   c         C   s   t  t |  | | ƒ ƒ S(   sµ   
            Return a copy of `self` with its elements centered in a
            string of length `width`.

            See also
            --------
            center
            (   R=   R   (   R‡   Rg   Rh   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ¥  s    	c         C   s   t  t |  | ƒ ƒ S(   sµ   
            Return a copy of `self` with its elements centered in a
            string of length `width`.

            See also
            --------
            center
            (   R=   R   (   R‡   Rg   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   °  s    	c         C   s   t  |  | | | ƒ S(   sÂ   
        Returns an array with the number of non-overlapping occurrences of
        substring `sub` in the range [`start`, `end`].

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

        (   R   (   R‡   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   »  s    
c         C   s   t  |  | | ƒ S(   sj   
        Calls `str.decode` element-wise.

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

        (   R   (   R‡   Rn   Ro   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   È  s    	c         C   s   t  |  | | ƒ S(   sj   
        Calls `str.encode` element-wise.

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

        (   R   (   R‡   Rn   Ro   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Ó  s    	c         C   s   t  |  | | | ƒ S(   sÅ   
        Returns a boolean array which is `True` where the string element
        in `self` ends with `suffix`, otherwise `False`.

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

        (   R   (   R‡   Rp   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   Þ  s    
i   c         C   s   t  t |  | ƒ ƒ S(   s·   
        Return a copy of each string element where all tab characters are
        replaced by one or more spaces.

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

        (   R=   R   (   R‡   Rq   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ê  s    
c         C   s   t  |  | | | ƒ S(   s§   
        For each element, return the lowest index in the string where
        substring `sub` is found.

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

        (   R   (   R‡   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   ö  s    
c         C   s   t  |  | | | ƒ S(   sŽ   
        Like `find`, but raises `ValueError` when the substring is not found.

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

        (   R   (   R‡   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR     s    	c         C   s
   t  |  ƒ S(   sß   
        Returns true for each element if all characters in the string
        are alphanumeric and there is at least one character, false
        otherwise.

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

        (   R   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR     s    c         C   s
   t  |  ƒ S(   sÝ   
        Returns true for each element if all characters in the string
        are alphabetic and there is at least one character, false
        otherwise.

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

        (   R    (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR      s    c         C   s
   t  |  ƒ S(   sÑ   
        Returns true for each element if all characters in the string are
        digits and there is at least one character, false otherwise.

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

        (   R!   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR!   '  s    
c         C   s
   t  |  ƒ S(   sè   
        Returns true for each element if all cased characters in the
        string are lowercase and there is at least one cased character,
        false otherwise.

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

        (   R"   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR"   3  s    c         C   s
   t  |  ƒ S(   sä   
        Returns true for each element if there are only whitespace
        characters in the string and there is at least one character,
        false otherwise.

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

        (   R#   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR#   @  s    c         C   s
   t  |  ƒ S(   sÌ   
        Returns true for each element if the element is a titlecased
        string and there is at least one character, false otherwise.

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

        (   R$   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR$   M  s    
c         C   s
   t  |  ƒ S(   sâ   
        Returns true for each element if all cased characters in the
        string are uppercase and there is at least one character, false
        otherwise.

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

        (   R%   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR%   Y  s    c         C   s   t  |  | ƒ S(   s    
        Return a string which is the concatenation of the strings in the
        sequence `seq`.

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

        (   R&   (   R‡   Rs   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR&   f  s    
c         C   s   t  t |  | | ƒ ƒ S(   sÂ   
            Return an array with the elements of `self` left-justified in a
            string of length `width`.

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

            (   R=   R'   (   R‡   Rg   Rh   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR'   s  s    
c         C   s   t  t |  | ƒ ƒ S(   s¼   
            Return an array with the elements of `self` left-justified in a
            string of length `width`.

            See also
            --------
            ljust
            (   R=   R'   (   R‡   Rg   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR'     s    	c         C   s   t  t |  ƒ ƒ S(   s”   
        Return an array with the elements of `self` converted to
        lowercase.

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

        (   R=   R(   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR(   Š  s    
c         C   s   t  t |  | ƒ ƒ S(   s    
        For each element in `self`, return a copy with the leading characters
        removed.

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

        (   R=   R)   (   R‡   Rt   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR)   –  s    
i   c         C   s   t  t |  | ƒ ƒ S(   s‰   
            Partition each element in `self` around `sep`.

            See also
            --------
            partition
            (   R=   R*   (   R‡   Rr   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR*   £  s    c         C   s   t  t |  | | | ƒ ƒ S(   sÅ   
        For each element in `self`, return a copy of the string with all
        occurrences of substring `old` replaced by `new`.

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

        (   R=   R+   (   R‡   Ru   Rv   R   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR+   ­  s    
c         C   s   t  |  | | | ƒ S(   sñ   
        For each element in `self`, return the highest index in the string
        where substring `sub` is found, such that `sub` is contained
        within [`start`, `end`].

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

        (   R,   (   R‡   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR,   ¹  s    c         C   s   t  |  | | | ƒ S(   sž   
        Like `rfind`, but raises `ValueError` when the substring `sub` is
        not found.

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

        (   R-   (   R‡   Rk   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR-   Æ  s    
c         C   s   t  t |  | | ƒ ƒ S(   sÃ   
            Return an array with the elements of `self`
            right-justified in a string of length `width`.

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

            (   R=   R.   (   R‡   Rg   Rh   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR.   Ó  s    
c         C   s   t  t |  | ƒ ƒ S(   s½   
            Return an array with the elements of `self`
            right-justified in a string of length `width`.

            See also
            --------
            rjust
            (   R=   R.   (   R‡   Rg   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR.   ß  s    	c         C   s   t  t |  | ƒ ƒ S(   sŠ   
            Partition each element in `self` around `sep`.

            See also
            --------
            rpartition
            (   R=   R/   (   R‡   Rr   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR/   ë  s    c         C   s   t  |  | | ƒ S(   sÔ   
            For each element in `self`, return a list of the words in
            the string, using `sep` as the delimiter string.

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

            (   R0   (   R‡   Rr   Rw   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR0   ö  s    
c         C   s   t  t |  | ƒ ƒ S(   s¡   
        For each element in `self`, return a copy with the trailing
        characters removed.

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

        (   R=   R1   (   R‡   Rt   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR1   	  s    
c         C   s   t  |  | | ƒ S(   s»   
        For each element in `self`, return a list of the words in the
        string, using `sep` as the delimiter string.

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

        (   R2   (   R‡   Rr   Rw   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR2   	  s    
c         C   s   t  |  | ƒ S(   s¹   
        For each element in `self`, return a list of the lines in the
        element, breaking at line boundaries.

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

        (   R3   (   R‡   Rx   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR3   	  s    
c         C   s   t  |  | | | ƒ S(   sÉ   
        Returns a boolean array which is `True` where the string element
        in `self` starts with `prefix`, otherwise `False`.

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

        (   R4   (   R‡   Ry   Rl   Rm   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR4   &	  s    
c         C   s   t  t |  | ƒ ƒ S(   s¬   
        For each element in `self`, return a copy with the leading and
        trailing characters removed.

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

        (   R=   R5   (   R‡   Rt   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR5   2	  s    
c         C   s   t  t |  ƒ ƒ S(   sÌ   
        For each element in `self`, return a copy of the string with
        uppercase characters converted to lowercase and vice versa.

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

        (   R=   R6   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR6   >	  s    
c         C   s   t  t |  ƒ ƒ S(   sô   
        For each element in `self`, return a titlecased version of the
        string: words start with uppercase characters, all remaining cased
        characters are lowercase.

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

        (   R=   R7   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR7   J	  s    c         C   s   t  t |  | | ƒ ƒ S(   sB  
        For each element in `self`, return a copy of the string where
        all characters occurring in the optional argument
        `deletechars` are removed, and the remaining characters have
        been mapped through the given translation table.

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

        (   R=   R8   (   R‡   Rz   R{   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR8   W	  s    c         C   s   t  t |  ƒ ƒ S(   s”   
        Return an array with the elements of `self` converted to
        uppercase.

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

        (   R=   R9   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR9   e	  s    
c         C   s   t  t |  | ƒ ƒ S(   s    
        Return the numeric string left-filled with zeros in a string of
        length `width`.

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

        (   R=   R:   (   R‡   Rg   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR:   q	  s    
c         C   s
   t  |  ƒ S(   s±   
        For each element in `self`, return True if there are only
        numeric characters in the element.

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

        (   R;   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR;   }	  s    
c         C   s
   t  |  ƒ S(   s±   
        For each element in `self`, return True if there are only
        decimal characters in the element.

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

        (   R<   (   R‡   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR<   ‰	  s    
N(   i   i   (   i   i   (   i   i   (   i   i   (   i   i   (   i   i   (?   t   __name__t
   __module__t   __doc__t   FalseRJ   Rƒ   R‹   R   R’   R“   R”   R•   R–   R—   RX   R˜   R\   R™   Rc   R›   Rž   R   R   t   syst   version_infoR   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   R4   R5   R6   R7   R8   R9   R:   R;   R<   (    (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR
   ‘  s†   L				
	
	
	
	
	
																		
	
					c      
   C   s«  t  |  t t f ƒ oI| d j o$ t  |  t ƒ o
 t } qG t } n | d j o t |  ƒ } n t |  ƒ | } | oµ t i d j o• t i	 d j o |  i
 d ƒ }  q,t  |  t ƒ o1 t i |  d ƒ } t i | d ƒ } | i }  q,t i |  d ƒ } t i | d ƒ } | i }  q<t |  ƒ }  n t |  ƒ }  t | d | d | d	 |  d
 | ƒSt  |  t t f ƒ o t i |  ƒ }  n t  |  t ƒ oUt |  i i t ƒ o?t  |  t ƒ p |  i t ƒ }  n | d j o1 |  i } t |  i i t ƒ o | d :} qn | d j o* t |  i i t ƒ o
 t } qFt } n | o
 t }	 n t }	 | d j	 o t i |  d
 | ƒ}  n | p? | |  i j p/ | o t  |  t ƒ p | o/ t  |  t ƒ o |  i |	 t | ƒ f ƒ }  n |  St  |  t ƒ o7 t |  i i t ƒ o! | d j o |  i ƒ  }  q4n | o
 t }	 n t }	 | d j o" t  |  d |	 d
 | d t ƒ}
 n% t  |  d |	 | f d
 | d t ƒ}
 |
 i t ƒ S(   sŸ	  
    Create a `chararray`.

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

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

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

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

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

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

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

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

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

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

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

    order : {'C', 'F', 'A'}, optional
        Specify the order of the array.  If order is 'C' (default), then the
        array will be in C-contiguous order (last-index varies the
        fastest).  If order is 'F', then the returned array
        will be in Fortran-contiguous order (first-index varies the
        fastest).  If order is 'A', then the returned array may
        be in any order (either C-, Fortran-contiguous, or even
        discontiguous).
    iÿÿ  i  t   utf_32t   u1t   u4t   u2RO   R†   R   R~   i   RB   t   subokN(!   R>   t   strR?   RJ   RR   R¤   RŽ   R¥   t
   maxunicodet
   hexversionR   RA   t
   frombufferR   t   dataR
   t   listt   tupleR=   R   R@   RB   RC   R   t   viewRO   R   R    t   astypeR_   t   objectRG   t   narray(   RŠ   RO   t   copyR†   R~   R…   t   asciit   ucs4t   ucs2RB   R   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR   –	  sr    >


&	


&
"$c      	   C   s   t  |  | d t d | d | ƒS(   sÒ  
    Convert the input to a `chararray`, copying the data only if
    necessary.

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

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

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

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

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

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

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

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

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

    order : {'C', 'F'}, optional
        Specify the order of the array.  If order is 'C' (default), then the
        array will be in C-contiguous order (last-index varies the
        fastest).  If order is 'F', then the returned array
        will be in Fortran-contiguous order (first-index varies the
        fastest).
    R·   R†   R~   (   R   R¤   (   RŠ   RO   R†   R~   (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyR=   8
  s    0(Q   R£   R¥   t   numerictypesR    R   R   R   R   R   t   numericR   R   R   R¶   t   numpy.core.multiarrayR	   RA   t   __all__R‚   R†   R?   t   lenRŽ   RF   RI   RN   RQ   R   R   R   R   R   R   R   R   R   R   R   R¦   R   RJ   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   R4   R5   R6   R7   R8   R9   R:   R;   R<   R
   RR   R=   (    (    (    sG   P:\graphics\Tools\Python26\lib\site-packages\numpy\core\defchararray.pyt   <module>   s°   .															#!	--"+'								 		!0 	$+!/	"	##	!			ÿ ÿ ÿ ¢