Current File : //proc/self/root/proc/self/root/lib64/python2.7/site-packages/numpy/lib/utils.pyo
�
E�`Qc@s�ddlZddlZddlZddlZddlmZmZmZddlm	Z	m
Z
mZdddddd	d
ddd
ddddgZd�Z
dd�Zejd,kr�ddlZd�Zn	d�Zdefd��YZd�Zd�Zd�Zd�Zdd�Zd�Zdadad d!�Zdd"ejd d#�Zejd$�Z ia!ej"d%ej#�Z$de%e&dd&�Z'd'�Z(d(�Z)d)efd*��YZ*d+�Z+dS(-i����N(tissubclass_tissubsctypet
issubdtype(tproducttndarraytufuncRRRt	deprecatetdeprecate_with_doctget_numarray_includetget_includetinfotsourcetwhotlookfortbyte_boundstmay_share_memoryt	safe_evalcCs|ddl}|jdkrEtjjtjj|j�dd�}n3ddlj	}tjjtjj|j�d�}|S(s�
    Return the directory that contains the NumPy \*.h header files.

    Extension modules that need to compile against NumPy should use this
    function to locate the appropriate include directory.

    Notes
    -----
    When using ``distutils``, for example in ``setup.py``.
    ::

        import numpy as np
        ...
        Extension('extension_name', ...
                include_dirs=[np.get_include()])
        ...

    i����Ntcoretinclude(
tnumpytshow_configtNonetostpathtjointdirnamet__file__t
numpy.coreR(RtdR((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR	s*$cCs?ddlm}|�}|dkr-|dS|t�gSdS(s�
    Return the directory that contains the numarray \*.h header files.

    Extension modules that need to compile against numarray should use this
    function to locate the appropriate include directory.

    Parameters
    ----------
    type : any, optional
        If `type` is not None, the location of the NumPy headers is returned
        as well.

    Returns
    -------
    dirs : str or list of str
        If `type` is None, `dirs` is a string containing the path to the
        numarray headers.
        If `type` is not None, `dirs` is a list of strings with first the
        path(s) to the numarray headers, followed by the path to the NumPy
        headers.

    Notes
    -----
    Useful when using ``distutils``, for example in ``setup.py``.
    ::

        import numpy as np
        ...
        Extension('extension_name', ...
                include_dirs=[np.get_numarray_include()])
        ...

    i����(tget_numarray_include_dirsiN(tnumpy.numarrayRRR	(ttypeRtinclude_dirs((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR+s
"	iicCs+tj|j|j||j|j�}|S(N(tnewtfunctiont	func_codetfunc_globalst
func_defaultstfunc_closure(tfunctname((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt_set_function_nameXscCs
||_|S(N(t__name__(R'R(((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR)]s	t
_DeprecatecBs)eZdZdddd�Zd�ZRS(s�
    Decorator class to deprecate old functions.

    Refer to `deprecate` for details.

    See Also
    --------
    deprecate

    cCs||_||_||_dS(N(told_nametnew_nametmessage(tselfR,R-R.((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt__init__ls		c
s;|j}|j}|j}ddl�|dkr`y
�j}Wq`tk
r\�j}q`Xn|dkryd|�nd||f�|dk	r��d|7�n���fd�}t||�}�j	}|dkr��}ndj
�|g�}||_	y
�j}	Wntk
r&nX|jj|	�|S(s:
        Decorator call.  Refer to ``decorate``.

        i����Ns`%s` is deprecated!s%`%s` is deprecated, use `%s` instead!s
cs�j�t��||�S(s1`arrayrange` is deprecated, use `arange` instead!(twarntDeprecationWarning(targstkwds(tdepdocR'twarnings(s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pytnewfunc�ss

(
R,R-R.R6Rt	func_nametAttributeErrorR*R)t__doc__Rt__dict__tupdate(
R/R'R3tkwargsR,R-R.R7tdocR((R5R'R6s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt__call__qs8			



			

N(R*t
__module__R:RR0R?(((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR+as
cOs�|rq|d}|d}d|kr<|jd�|d<nd|kr^|jd�|d<nt||�|�St||�SdS(s�
    Issues a DeprecationWarning, adds warning to `old_name`'s
    docstring, rebinds ``old_name.__name__`` and returns the new
    function object.

    This function may also be used as a decorator.

    Parameters
    ----------
    func : function
        The function to be deprecated.
    old_name : str, optional
        The name of the function to be deprecated. Default is None, in which
        case the name of `func` is used.
    new_name : str, optional
        The new name for the function. Default is None, in which case
        the deprecation message is that `old_name` is deprecated. If given,
        the deprecation message is that `old_name` is deprecated and `new_name`
        should be used instead.
    message : str, optional
        Additional explanation of the deprecation.  Displayed in the docstring
        after the warning.

    Returns
    -------
    old_func : function
        The deprecated function.

    Examples
    --------
    Note that ``olduint`` returns a value after printing Deprecation Warning:

    >>> olduint = np.deprecate(np.uint)
    >>> olduint(6)
    /usr/lib/python2.5/site-packages/numpy/lib/utils.py:114:
    DeprecationWarning: uint32 is deprecated
      warnings.warn(str1, DeprecationWarning)
    6

    iitnewnameR-toldnameR,N(tpopR+(R3R=tfn((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�s-

cCs
td|�S(NR.(R+(tmsg((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt<lambda>�scCs�|j}|dd}|d}|d}t|�}t|dd�}|}}|d	kr~|t|dt�|7}n]xPt||�D]?\}	}
|
dkr�||	d|
7}q�||	d|
7}q�W||7}||fS(
s!
    Returns pointers to the end-points of an array.

    Parameters
    ----------
    a : ndarray
        Input array. It must conform to the Python-side of the array interface.

    Returns
    -------
    (low, high) : tuple of 2 integers
        The first integer is the first byte of the array, the second integer is
        just past the last byte of the array.  If `a` is not contiguous it
        will not use every byte between the (`low`, `high`) values.

    Examples
    --------
    >>> I = np.eye(2, dtype='f'); I.dtype
    dtype('float32')
    >>> low, high = np.byte_bounds(I)
    >>> high - low == I.size*I.itemsize
    True
    >>> I = np.eye(2, dtype='G'); I.dtype
    dtype('complex192')
    >>> low, high = np.byte_bounds(I)
    >>> high - low == I.size*I.itemsize
    True

    tdataitstridestshapettypestritdtypeiN(t__array_interface__tlentintRRtzip(tataita_datatastridestashapetnd_atbytes_ata_lowta_highRItstride((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�s	



cCsDt|�\}}t|�\}}||ks<||kr@tStS(s�
    Determine if two arrays can share memory

    The memory-bounds of a and b are computed.  If they overlap then
    this function returns True.  Otherwise, it returns False.

    A return of True does not necessarily mean that the two arrays
    share any element.  It just means that they *might*.

    Parameters
    ----------
    a, b : ndarray

    Returns
    -------
    out : bool

    Examples
    --------
    >>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
    False

    (RtFalsetTrue(RPtbRWRXtb_lowtb_high((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyRs
cCs|dkr'tj�j}|j}ng}i}x�|j�D]�}t||t�r@||}t|�}||j�kr�|d||}d}n|||<|}d}dj	t
t|j��}	t|j
�}
|j||	|
|jj|g�q@q@Wd}d}d}
d}x�tt|��D]�}||}|t|d�krit|d�}n|t|d�kr�t|d�}n|
t|d�kr�t|d�}
n|dr0|t|d�7}q0q0Wt|�dkr`td|�}td|�}td|
�}d|d	|d	|d	f}|d
dt|�dd
GHnx�tt|��D]�}||}d
|dd	|t|d�d|dd	|t|d�d|dd	|t|d�d|dfGHqsWd|GHdS(s%
    Print the Numpy arrays in the given dictionary.

    If there is no dictionary passed in or `vardict` is None then returns
    Numpy arrays in the globals() dictionary (all Numpy arrays in the
    namespace).

    Parameters
    ----------
    vardict : dict, optional
        A dictionary possibly containing ndarrays.  Default is globals().

    Returns
    -------
    out : None
        Returns 'None'.

    Notes
    -----
    Prints out the name, shape, bytes and type of all of the ndarrays present
    in `vardict`.

    Examples
    --------
    >>> a = np.arange(10)
    >>> b = np.ones(20)
    >>> np.who()
    Name            Shape            Bytes            Type
    ===========================================================
    a               10               40               int32
    b               20               160              float64
    Upper bound on total bytes  =       200

    >>> d = {'x': np.arange(2.0), 'y': np.arange(3.0), 'txt': 'Some str',
    ... 'idx':5}
    >>> np.who(d)
    Name            Shape            Bytes            Type
    ===========================================================
    y               3                24               float64
    x               2                16               float64
    Upper bound on total bytes  =       40

    s (%s)iis x iii
sName %s Shape %s Bytes %s Typet s
t=is%s %s %s %s %s %s %sis'
Upper bound on total bytes  =       %dN(Rtsyst	_getframetf_backt	f_globalstkeyst
isinstanceRtidRtmaptstrRItnbytestappendRKR(trangeRMRNtmax(tvardicttframetstatcacheR(tvartidvtnamestrtoriginaltshapestrtbytestrtmaxnametmaxshapetmaxbytet
totalbytestktvaltsp1tsp2tsp3tprval((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR5s^,
	


"
#  	c
Cs�t|�}|}|}d}|j|�}x�|D]�}||krOd}	n|}	|t|�t|	�}||kr�|dt|�}|dd|d|}q4||	|}q4W|S(Ns, tis,
R_i(RMtsplit(
R(t	argumentstwidtht
firstwidthR|tnewstrtsepstrtarglisttargumenttaddstr((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt_split_line�s
	RcCs�t|t�t�g�}i|j|j6}|jg}|jg}x�t|�dkr_Pn|jd�}xz|j�D]l}t||t	j
�r{||j}||kr�||j}|j|�|j|�|||<q�q{q{WqI||fS(Ni(t
__import__tglobalstlocalsR;R*RMRCReRfttypest
ModuleTypeRk(tmoduletthedicttdictlistt
totraversetthisdicttxtmodnametmoddict((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt
_makenamedict�s"



iLcCs�ddl}ddl}t|d�s6t|d�rB|j}nt|d�r]|j}n|dkrvtt�n<t|t�r�ddl	j
}|j|d|dd�nt|t�r�tdkr�t
|�\aand	}g}x�tD]�}	yxt|	|}
t|
�|kr-|d
|	IJn9|jt|
��|d|	IJt|
�|d|IJ|d7}Wq�tk
r�q�Xq�W|d	kr�|d
|IJq�|d|IJn�|j|�rD|j}|j|j|��}t||�|krt|||�}
n
||}
|d|
dIJ||j|�IJnn|j|�r4|j}d}y}t|d�r�|j|j|jj��}|jd�}t|�dkr�d|d|d<dj|d�}q�nWnnXt||�|krt|||�}
n
||}
|d|
dIJ|j|�}|dkrvt|d�r�||j|j�IJq�n||j|�IJ|j|�}|gkr�|dIJx�|D]u}|d	dkr�q�nt ||d�}|dk	r|j!|j|�pd�\}}n|d||fIJq�Wq�n~t"|�t#j$kr�|dI|j%jIJ|Jt|d�r�|j|j|j&j��}|jd�}t|�dkr�d|d|d<dj|d�}nd}t|d�r�d|j'}nd}t||�|kr/t|||�}
n
||}
|d|
dIJ|j|j&�}|dk	r�||j|j&�IJn||j|�IJq�||j|�IJn|j(|�r�|j}|j|j|j��}|jd�}t|�dkr*d|d|d<dj|d�}nd}t||�|kr[t|||�}
n
||}
|d|
dIJ||j|�IJn%t|d�r�||j|�IJndS(s�
    Get help information for a function, class, or module.

    Parameters
    ----------
    object : object or str, optional
        Input object or name to get information about. If `object` is a
        numpy object, its docstring is given. If it is a string, available
        modules are searched for matching objects.
        If None, information about `info` itself is returned.
    maxwidth : int, optional
        Printing width.
    output : file like object, optional
        File like object that the output is written to, default is ``stdout``.
        The object has to be opened in 'w' or 'a' mode.
    toplevel : str, optional
        Start search at this level.

    See Also
    --------
    source, lookfor

    Notes
    -----
    When used interactively with an object, ``np.info(obj)`` is equivalent to
    ``help(obj)`` on the Python prompt or ``obj?`` on the IPython prompt.

    Examples
    --------
    >>> np.info(np.polyval) # doctest: +SKIP
       polyval(p, x)
         Evaluate the polynomial p at x.
         ...

    When using a string for `object` it is possible to get multiple results.

    >>> np.info('fft') # doctest: +SKIP
         *** Found in numpy ***
    Core FFT routines
    ...
         *** Found in numpy.fft ***
     fft(a, n=None, axis=-1)
    ...
         *** Repeat reference found in numpy.fft.fftpack ***
         *** Total of 3 references found. ***

    i����Nt_ppimport_importert_ppimport_modulet_ppimport_attrtoutputRiis+
     *** Repeat reference found in %s *** s     *** Found in %s ***t-sHelp for %s not found.s+
     *** Total of %d references found. ***R_s
s()R0s, t(s

Methods:
t_Rs  %s  --  %ssInstance of class: R?R(s%ss<name>R:()tpydoctinspectthasattrR�R�RR
RfRRtnumarrayRit	_namedictR�t	_dictlistRgRktKeyErrort
isfunctionR8t
formatargspect
getargspecRMR�tgetdoctisclassR*R0tim_funcR�Rt
allmethodstgetattrtsplitdocRR�tInstanceTypet	__class__R?R(tismethod(tobjecttmaxwidthR�ttoplevelR�R�tnntnumfoundtobjlistRttobjR(R�targstrR�tdoc1tmethodstmethtthisobjtmethstrtotherR>((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR
�s�2



	
	


'
	
cCsRddl}y.|d|j|�IJ||j|�IJWn|dIJnXdS(s�
    Print or write to a file the source code for a Numpy object.

    The source code is only returned for objects written in Python. Many
    functions and classes are defined in C and will therefore not return
    useful information.

    Parameters
    ----------
    object : numpy object
        Input object. This can be any object (function, class, module, ...).
    output : file object, optional
        If `output` not supplied then source code is printed to screen
        (sys.stdout).  File object must be created with either write 'w' or
        append 'a' modes.

    See Also
    --------
    lookfor, info

    Examples
    --------
    >>> np.source(np.interp)                        #doctest: +SKIP
    In file: /usr/lib/python2.6/dist-packages/numpy/lib/function_base.py
    def interp(x, xp, fp, left=None, right=None):
        """.... (full docstring printed)"""
        if isinstance(x, (float, int, number)):
            return compiled_interp([x], xp, fp, left, right).item()
        else:
            return compiled_interp(x, xp, fp, left, right)

    The source code is only returned for objects written in Python.

    >>> np.source(np.array)                         #doctest: +SKIP
    Not available for this object.

    i����NsIn file: %s
sNot available for this object.(R�t
getsourcefilet	getsource(R�R�R�((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�s's[a-z0-9_]+\(.*[,=].*\)cs�ddl}t|||��g}t|�j�j���sFdSx��j�D]v\}\}}	}
|	dkrzqSnt}|j�}x$�D]}
|
|kr�t}Pq�q�W|rS|j|�qSqSWidd6dd6dd6dd6���fd	����fd
�}|j	d|�dd
j
��}|dt|�g}x�|ddd�D]�}�|\}}	}g|j�jd�D]}|j�r�|j�^q�}y6|dj�}t
j|�r�|dj�}nWntk
rd}nX|jd||f�q`W|s4|jd�n|dk	rY|jdj
|��nBt|�dkr�|j�}|dj
|��ndj
|�GHdS(s�
    Do a keyword search on docstrings.

    A list of of objects that matched the search is displayed,
    sorted by relevance. All given keywords need to be found in the
    docstring for it to be returned as a result, but the order does
    not matter.

    Parameters
    ----------
    what : str
        String containing words to look for.
    module : str or list, optional
        Name of module(s) whose docstrings to go through.
    import_modules : bool, optional
        Whether to import sub-modules in packages. Default is True.
    regenerate : bool, optional
        Whether to re-generate the docstring cache. Default is False.
    output : file-like, optional
        File-like object to write the output to. If omitted, use a pager.

    See Also
    --------
    source, info

    Notes
    -----
    Relevance is determined only roughly, by checking if the keywords occur
    in the function name, at the start of a docstring, etc.

    Examples
    --------
    >>> np.lookfor('binary representation')
    Search results for 'binary representation'
    ------------------------------------------
    numpy.binary_repr
        Return the binary representation of the input number as a string.
    numpy.core.setup_common.long_double_representation
        Given a binary dump as given by GNU od -b, look for long double
    numpy.base_repr
        Return a string representation of a number in the given base system.
    ...

    i����NR�R�i�R'tclassi���cs�d}dj|j�j�jd�d �}|tg�D]}||kr;d^q;�7}|tg�D]}||krjd^qj�7}|t|�d7}|�j|d�7}||jd�d	7}|t|d
d�7}|S(Nis
ii�iii���t.i
idi����(	RtlowertstripR�tsumRMtgettcountRm(R(tdocstrtkindtindextrt	first_doctw(tkind_relevancetwhats(s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt	relevances(//cs�|�|�S(N((RP(RqR�(s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pytrelevance_valuestkeysSearch results for '%s'R_R�s
iiR�s	%s
    %ssNothing found.i
(smodulesobject(R�t_lookfor_generate_cacheRiR�R�t	iteritemsR[RZRktsortRRMR�t_function_signature_retsearcht
IndexErrorRtwritetgetpager(twhatR�timport_modulest
regenerateR�R�tfoundR(t	docstringR�R�tokR>R�R�tst	help_texttixtlinetdoclinesR�tpager((RqR�R�R�s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR
�sV."


cCs�ddl}ddlm}|dkr1d}nt|t�rsyt|�Wntk
rbiSXtj	|}nRt|t
�s�t|t�r�i}x'|D]}|jt
|||��q�W|St|�tkr�|r�tt|�Si}|tt|�<i}d}|j|fg}	x�|	r�|	jd�\}
}t|�|krVq#nt|t|�<|d7}d}|j|�r0d}y
|j}
Wntk
r�d}
nX|rt|d	�rxP|jD]B}x9tj|�D](}tjj||�}tjj||d
�}tjj|�rH|jd�rH|d }ntjj|�r�|}nq�|d
krxq�ny
t}Wntk
r�t }nXy\tj!}tj"}z0|�t_!|�t_"td|
|f�Wd|t_!|t_"XWq�|k
rq�q�Xq�Wq�Wnx}t#|�D]\}}y2t$|dd|
|f�}t$|dd�}Wn'tk
r�d|
|f}d}nXd|kr�|r�d||f}n|j%|
d�s�t|t&�r'qq'n-|j|�p|
dkp||
ksq'n|	j'd|
|f|f�q'Wnj|j(|�r�d}xRt#|�D])\}}|	j'd|
|f|f�qRWnt|d�r�d}ny|j)|�}Wntk
r�d}nX|dk	r#|||f||
<q#q#W|S(s�
    Generate docstring cache for given module.

    Parameters
    ----------
    module : str, None, module
        Module for which to generate docstring cache
    import_modules : bool
        Whether to import sub-modules in packages.
    regenerate: bool
        Re-generate the docstring cache

    Returns
    -------
    cache : dict {obj_full_name: (docstring, kind, index), ...}
        Docstring cache for the module, either cached one (regenerate=False)
        or newly generated.

    i����N(tStringIORiiR�R�t__path__s__init__.pys.pyi����R0s%s.%sR*R@R�R�R?R'(*R�t	cStringIOR�RRfRiR�tImportErrorRatmodulestlistttupleR<R�Rgt_lookfor_cachesR*RCR[tismodulet__all__R9R�R�RtlistdirRRtisfiletendswitht
BaseExceptiont	NameErrort	Exceptiontstdouttstderrt_getmembersR�t
startswithRRkR�R�(R�R�R�R�R�RqtmodtseenR�tstackR(titemR�t_alltpthtmod_pathtthis_pytinit_pyt	to_importtbase_exct
old_stdoutt
old_stderrtntvt	item_nametmod_nameR>((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�:s�	

	



!
	


			


'$$	

cCstddl}y|j|�}WnNtk
rogt|�D]*}t||�r<|t||�f^q<}nX|S(Ni����(R�t
getmembersR9tdirR�R�(RR�tmembersR�((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR��s
.tSafeEvalcBs�eZdZejddkr|d�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zncd
�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�ZRS(s
    Object to evaluate constant string expressions.

    This includes strings with lists, dicts and tuples using the abstract
    syntax tree created by ``compiler.parse``.

    For an example of usage, see `safe_eval`.

    See Also
    --------
    safe_eval

    iicKs2|j}t|d|j|j�}|||�S(Ntvisit(R�R�R*tdefault(R/tnodetkwtclsR�((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�s	cKstd|j��dS(Ns Unsupported source construct: %s(tSyntaxErrorR�(R/RR((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�scKs(x!|j�D]}|j||�SWdS(N(t
getChildNodesR(R/RRtchild((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pytvisitExpression�scKs|jS(N(tvalue(R/RR((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt
visitConst�scKs>tg|jD]*\}}|j|�|j|�f^q
�S(N(tdicttitemsR(R/RRR|R
((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt	visitDict�scKs)tg|jD]}|j|�^q
�S(N(R�tnodesR(R/RRti((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt
visitTuple�scKs#g|jD]}|j|�^q
S(N(R"R(R/RRR#((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt	visitListscKs|j|j�d�
S(Ni(RR(R/RR((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt
visitUnaryAddscKs|j|j�d�S(Ni(RR(R/RR((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt
visitUnarySubscKsP|jdkrtS|jdkr&tS|jdkr9dStd|j��dS(NRZR[RsUnknown name: %s(R(RZR[RR(R/RR((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt	visitNamescCs/|j}t|d|j|j�}||�S(NR(R�R�R*R(R/RRR�((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyRs	cCstd|j��dS(Ns Unsupported source construct: %s(RR�(R/R((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyRscCs|j|j�S(N(Rtbody(R/R((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyRscCs|jS(N(R(R/R((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pytvisitNum"scCs|jS(N(R�(R/R((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pytvisitStr%scCs|jS(N(R�(R/R((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt
visitBytes(scKsJtgt|j|j�D]*\}}|j|�|j|�f^q�S(N(RRORetvaluesR(R/RRR|R
((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR!+scCs)tg|jD]}|j|�^q
�S(N(R�teltsR(R/RR#((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR$/scCs#g|jD]}|j|�^q
S(N(R.R(R/RR#((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR%2scCsoddl}t|j|j�r2|j|j�
St|j|j�rX|j|j�Std|j��dS(Ni����sUnknown unary op: %r(tastRftoptUAddRtoperandtUSubR(R/RR/((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pytvisitUnaryOp5scCsP|jdkrtS|jdkr&tS|jdkr9dStd|j��dS(NRZR[RsUnknown name: %s(RgRZR[RR(R/R((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR(>s(R*R@R:Ratversion_infoRRRRR!R$R%R&R'R(R*R+R,R4(((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyR�s.
																				cCs�ddl}ddlm}|�}|j�zD|jdt�yddl}Wntk
rqddl}nXWd|j	�Xt
�}y|j|dd�}Wntk
r�}�nXy|j
|�SWntk
r�}�nXdS(s�
    Protected string evaluation.

    Evaluate a string containing a Python literal expression without
    allowing the execution of arbitrary non-literal code.

    Parameters
    ----------
    source : str
        The string to evaluate.

    Returns
    -------
    obj : object
       The result of evaluating `source`.

    Raises
    ------
    SyntaxError
        If the code has invalid Python syntax, or if it contains non-literal
        code.

    Examples
    --------
    >>> np.safe_eval('1')
    1
    >>> np.safe_eval('[1, 2, 3]')
    [1, 2, 3]
    >>> np.safe_eval('{"foo": ("bar", 10.0)}')
    {'foo': ('bar', 10.0)}

    >>> np.safe_eval('import os')
    Traceback (most recent call last):
      ...
    SyntaxError: invalid syntax

    >>> np.safe_eval('open("/home/user/.ssh/id_dsa").read()')
    Traceback (most recent call last):
      ...
    SyntaxError: Unsupported source construct: compiler.ast.CallFunc

    i����N(tWarningManagertignoretmodeteval(R6tnumpy.testing.utilsR6t	__enter__tsimplefilterR2tcompilerR�R/t__exit__RtparseRR(RR6R6twarn_ctxR=twalkerR/terr((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyRHs(,	

	(ii(,RRaR�tretnumpy.core.numerictypesRRRRRRRR�R	RRR5R!R)R�R+RRRRRR�R�R�R�R�R
RR�tcompiletIR�R[RZR
R�R�RR(((s5/usr/lib64/python2.7/site-packages/numpy/lib/utils.pyt<module>sF			*	<	<		2	#i	�2	~	�	l