%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyc

�
�9Zc@`s{dZddlmZmZmZddlZddlZddlZddlZddl	Z
ddlmZm
Z
mZmZmZmZmZyddlZeZWnek
r�eZnXdefd��YZdefd��YZd	efd
��YZdefd��YZd
efd��YZdefd��YZdefd��YZdefd��YZ defd��YZ!defd��YZ"defd��YZ#defd��YZ$defd��YZ%dd,d ��YZ&d!efd"��YZ'd#efd$��YZ(d%efd&��YZ)d'efd(��YZ*d)efd*��YZ+e,d+krwe�ndS(-s�
Tests related to deprecation warnings. Also a convenient place
to document how deprecations should eventually be turned into errors.

i(tdivisiontabsolute_importtprint_functionN(trun_module_suitet
assert_raisestassert_warnstassert_no_warningstassert_array_equaltassert_tdect_VisibleDeprecationTestCasecB`sPeZdZd�Zd�Zdeeejfdid�Zdid�Z	RS(tcC`s`tjdt�|_|jj�|_tjddtj�tjdd|j	dtj�dS(Ntrecordtalwaystcategorytmessage(
twarningstcatch_warningstTruetwarn_ctxt	__enter__tlogtfilterwarningstnptVisibleDeprecationWarningR(tself((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pytsetUps
cC`s|jj�dS(N(Rt__exit__(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttearDown,sic

C`s�g|j(y|||�Wn |r+tnt�k
r=nXd}xO|jD]D}	|	jtjkrs|d7}qN|sNtd|	jf��qNqNW|dk	r||krdt|j�|f}
g|jD]}|j^q�}tdj	|
g|���nt
j���t
jdd|j
dtj�y/|||�|t�kr_td	��nWn/|k
r�|t�kr�td
��q�nXWdQXdS(sTest if VisibleDeprecationWarnings are given and raised.

        This first checks if the function when called gives `num`
        VisibleDeprecationWarnings, after that it tries to raise these
        VisibleDeprecationWarnings and compares them with `exceptions`.
        The exceptions can be different for cases where this code path
        is simply not anticipated and the exception is replaced.

        Parameters
        ----------
        f : callable
            The function to test
        num : int
            Number of VisibleDeprecationWarnings to expect. This should
            normally be 1.
        ignore_other : bool
            Whether warnings of the wrong type should be ignored (note that
            the message is not checked)
        function_fails : bool
            If the function would normally fail, setting this will check for
            warnings inside a try/except block.
        exceptions : Exception or tuple of Exceptions
            Exception to expect when turning the warnings into an error.
            The default checks for DeprecationWarnings. If exceptions is
            empty the function is expected to run successfull.
        args : tuple
            Arguments for `f`
        kwargs : dict
            Keyword arguments for `f`
        iis'expected DeprecationWarning but got: %ss"%i warnings found but %i expected.s
terrorRRs$No error raised during function calls!Error raised during function callN(Rt	ExceptionttupleRRRtAssertionErrortNonetlentjoinRRRR(
Rtfunctiontnumt
ignore_otherstfunction_failst
exceptionstargstkwargst	num_foundtwarningtmsgtwtlst((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pytassert_deprecated/s:#





cC`s2|j|dddtdt�d|d|�dS(s�Test if VisibleDeprecationWarnings are given and raised.

        This is just a shorthand for:

        self.assert_deprecated(function, num=0, ignore_others=True,
                        exceptions=tuple(), args=args, kwargs=kwargs)
        R%iR&R(R)R*N(R0RR(RR$R)R*((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pytassert_not_deprecatedts(((
t__name__t
__module__RRRtFalseRRR0R1(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR
s			Bt_DeprecationTestCasecB`sMeZdZd�Zd�Zdeeefdid�Zdid�ZRS(RcC`sZtjdt�|_|jj�|_tjddt�tjdd|jdt�dS(NRR
RR(	RRRRRRRtDeprecationWarningR(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR�s
cC`s|jj�dS(N(RR(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR�sic

C`s�g|j(y|||�Wn |r+tnt�k
r=nXd}xL|jD]A}	|	jtkrp|d7}qN|sNtd|	jf��qNqNW|dk	r||krdt|j�|f}
g|jD]}|j^q�}tdj|
g|���nt	j
���t	jdd|jdt�y/|||�|t�krYtd	��nWn/|k
r�|t�kr�td
��q�nXWdQXdS(s�Test if DeprecationWarnings are given and raised.

        This first checks if the function when called gives `num`
        DeprecationWarnings, after that it tries to raise these
        DeprecationWarnings and compares them with `exceptions`.
        The exceptions can be different for cases where this code path
        is simply not anticipated and the exception is replaced.

        Parameters
        ----------
        f : callable
            The function to test
        num : int
            Number of DeprecationWarnings to expect. This should normally be 1.
        ignore_other : bool
            Whether warnings of the wrong type should be ignored (note that
            the message is not checked)
        function_fails : bool
            If the function would normally fail, setting this will check for
            warnings inside a try/except block.
        exceptions : Exception or tuple of Exceptions
            Exception to expect when turning the warnings into an error.
            The default checks for DeprecationWarnings. If exceptions is
            empty the function is expected to run successfull.
        args : tuple
            Arguments for `f`
        kwargs : dict
            Keyword arguments for `f`
        iis'expected DeprecationWarning but got: %ss"%i warnings found but %i expected.s
RRRs$No error raised during function calls!Error raised during function callN(
RRRRR6R R!R"R#RRRR(
RR$R%R&R'R(R)R*R+R,R-R.R/((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR0�s:!




cC`s2|j|dddtdt�d|d|�dS(s�Test if DeprecationWarnings are given and raised.

        This is just a shorthand for:

        self.assert_deprecated(function, num=0, ignore_others=True,
                        exceptions=tuple(), args=args, kwargs=kwargs)
        R%iR&R(R)R*N(R0RR(RR$R)R*((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR1�s(((	R2R3RRRR4R6R0R1(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR5�s		At&TestFloatNonIntegerArgumentDeprecationcB`sSeZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s�
    These test that ``DeprecationWarning`` is given when you try to use
    non-integers as arguments to for indexing and slicing e.g. ``a[0.0:5]``
    and ``a[0.5]``, or other functions like ``array.reshape(1., -1)``.

    After deprecation, changes need to be done inside conversion_utils.c
    in PyArray_PyIntAsIntp and possibly PyArray_IntpConverter.
    In iterators.c the function slice_GetIndices could be removed in favor
    of its python equivalent and in mapping.c the function _tuple_of_integers
    can be simplified (if ``np.array([1]).__index__()`` is also deprecated).

    As for the deprecation time-frame: via Ralf Gommers,

    "Hard to put that as a version number, since we don't know if the
    version after 1.8 will be 6 months or 2 years after. I'd say 2
    years is reasonable."

    I interpret this to mean 2 years after the 1.8 release. Possibly
    giving a PendingDeprecationWarning before that (which is visible
    by default)

    sVusing a non-integer number instead of an integer will result in an error in the futurec`s�tjdggg���fd�}|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd	��|�fd
��|�fd��|�fd��|�fd
��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd�dd�|�fd�dd�dS(Nic`s�jdtf||�dS(NR((R0t
IndexError(R)R*(R(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR0sc`s�dS(Ng(((ta(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt<lambda>sc`s�dS(Nig(ig(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Ngi(gi(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�ddd�fS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dd�dfS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:	sc`s�dd�ddd�fS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:
sc`s�ddd�dd�fS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Nig(iig(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Ngi(gii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:
sc`s�dS(Nig(igi(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Ngffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Nigffffff��(igffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Ngffffff��i(gffffff��i(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�ddd�fS(Ngffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dd�dfS(Ngffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dd�ddd�fS(Ngffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�ddd�dd�fS(Ngffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Nigffffff��(iigffffff��(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Ngffffff��i(gffffff��ii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dS(Nigffffff��(igffffff��i(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sc`s�dd�dfS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:sR%ic`s�dd�ddd�fS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:s(Rtarray(RR0((R9RsU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt
test_indexing�s0c`s�tjdggg��|j}|�fd��|�fd��|�fd��|�fd��|�fd��dS(Nic`s�tjdg�S(Ni(RR;((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:#sc`s�ddgS(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:$sc`s�dd�ddgfS(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:%sc`s�dd�ddd�fS(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:&sc`s#�dd�dd�dd�fS(N(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:'s(RR;R1(RR1((R9sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_valid_indexings	c`s�tjdgg���fd�}|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd	��|�fd
��|�fd��|�fd��|�fd
��|�fd��|�fd��|�fd��|�fd��|�fd�dd�|�fd�dd�|�fd�dd�|�fd�dd�|�fd�dd�|�fd�dd�|�fd�dt�dS(Nic`s�jdtf||�dS(NR((R0R8(R)R*(R(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR0,sc`s�dS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:0sc`s�dd�dd�fS(Nigi(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:1sc`s�ddd�dd�fS(Ngii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:2sc`s�ddd�dd�fS(Ngii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:3sc`s�dd�dd�fS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:4sc`s�d S(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:6sc`s�dd�dd�fS(Niig@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:7sc`s�ddd�dd�fS(Ngii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:8sc`s�dd�dd�fS(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:9sc`s�dd�ddd�fS(Nig@i(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR::sc`s�ddd�S(Ng�?(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:<sc`s�dd�ddd�fS(Niig@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:=sc`s�ddd�dd�fS(Nig@i(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:>sc`s�ddd�dd�fS(Ng@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:?sc`s�dd�ddd�fS(Niig@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:@sc`s�ddd�S(Ng�?ig@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:BsR%ic`s�ddd�S(Ng�?g@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Csc`s�dd�ddd�fS(Nig@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Dsc`s�ddd�dd�fS(Ng�?ig@i(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Esc`s�ddd�dd�fS(Ng�?g@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Fsic`s�dd�ddd�fS(Ng�������?g@g@(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Gsc`s�ddd�S(Ng(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:IsR'(RR;R(RR0((R9RsU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_slicing)s0c`s�tjdggg��|j}|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd��|�fd	��dS(
Nic`s�ddd�S(N(R!((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Osc`s�dS(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Psc`s�d S(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Qsc`s�dd!S(Nii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Rsc`s�ddd�S(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Ssc`s�ddd�S(Nii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Tsc`s�ddd�S(Ni(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Usc`s�ddd�S(Nii(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Vs(RR;R1(RR1((R9sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_valid_slicingKs	cC`s�tjdgg�}|jtjd|dfdd�|jtjd|tjd�dff�|jtjd|dgdf�|jtjd|dgtjd�f�dS(	NiR)g�?i����R%ii(g�?g�?i����(RR;R0treshapettaketfloat64(RR9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt&test_non_integer_argument_deprecationsXs
"+"cC`sWd�}|j|ddgtjd�f�|j|ddgtjd�f�dS(NcS`s||S(N((R9tb((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pytmultbsR)ii(R0Rtfloat_R1tint_(RRE((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt(test_non_integer_sequence_multiplication`s	%cC`s�tjd
�}|jtjd|df�|jtjddd|df�|jtjddd|df�|jtjddd|d
f�dS(NiR)g�?R%ig������@ig�������?g333333�?(iii(g�?i(ig������@(g�������?g333333�?(RtzerosR0tmin(Rtd((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_reduce_axis_float_indexhs
""(R2R3t__doc__RR<R=R>R?RCRHRL(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR7�s	 	
	"	
		tTestBooleanArgumentDeprecationcB`seZdZdZd�ZRS(s�This tests that using a boolean as integer argument/indexing is
    deprecated.

    This should be kept in sync with TestFloatNonIntegerArgumentDeprecation
    and like it is handled in PyArray_PyIntAsIntp.
    sKusing a boolean instead of an integer will result in an error in the futurec`stjdggg��|jtjd�tdff�|jtjd�tjt�dff�tttj	tjt��|jtj
d�dgtf�|j�fd�dtdd�|j�fd	�dt�|j�fd
�dt�dS(NiR)i����ic`s�ttt�S(N(R4R((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:�sR(R%ic`s�tdfS(Ni(R4((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:�sc`s�tddfS(Ni(R4((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:�s(
RR;R0R@Rtbool_Rt	TypeErrortoperatortindexRAR4R8(R((R9sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_bool_as_int_argumentzs"+""(R2R3RMRRS(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRNpstTestArrayToIndexDeprecationcB`seZdZdZd�ZRS(s+This tests that creating an an index from an array is deprecated
    if the array is not 0d.

    This can probably be deprecated somewhat faster then the integer
    deprecations. The deprecation period started with NumPy 1.8.
    For deprecation this needs changing of array_index in number.c
    sTconverting an array with ndim \> 0 to an index will result in an error in the futurec`s�tjdggg��|jtjdtjdg�f�|jtjd��dffdd	�|jtjd�dg�fdd
�|j�fd�dddd�dS(NiR)i����R(ic`s�����S(N(((R9(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:�sR%i((((RR;R0RQRRR@RA(R((R9sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_array_to_index_deprecation�s
%(((R2R3RMRRU(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRT�stTestNonIntegerArrayLikecB`s&eZdZdZd�Zd�ZRS(suTests that array likes, i.e. lists give a deprecation warning
    when they cannot be safely cast to an integer.
    sYnon integer \(and non boolean\) array-likes will not be accepted as indices in the futurecC`svtjd�}|j|jdddgfdt�|j|jdddgffdt�|j|jgf�dS(Ni
R)g�?g�?R(t1t2(RtarangeR0t__getitem__R8R1(RR9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt
test_basic�s!c	C`stjd�}tj��(tjd�tt|jtg�WdQXtj��(tjd�t	t|jtg�WdQXdS(Ni
R
R(
RRYRRRRt
FutureWarningRZRR(RR9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_boolean_futurewarning�s



(R2R3RMRR[R](((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRV�s		tTestMultipleEllipsisDeprecationcB`seZdZd�ZRS(s\an index can only have a single Ellipsis \(`...`\); replace all but one with slices \(`:`\).c	C`s�tjd�}|j|jdttff�tj��Otjddtj�|d}t	||�t
t|jtfdf�WdQXdS(Ni
R)tignoreR.i(..(RRYR0RZtEllipsisRRRRRRR8(RR9RD((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR[�s


(R2R3RR[(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR^�st TestBooleanUnaryMinusDeprecationcB`seZdZdZd�ZRS(s�Test deprecation of unary boolean `-`. While + and * are well
    defined, unary - is not and even a corrected form seems to have
    no real uses.

    The deprecation process was started in NumPy 1.9.
    s,numpy boolean negative, the `-` operator, .*cC`sWtjtg�}tjt�}|jtjd|f�|jtjd|f�dS(NR)(RR;RROR0RQtneg(RR;tgeneric((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt%test_unary_minus_operator_deprecation�s(R2R3RMRRd(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRa�st!TestBooleanBinaryMinusDeprecationcB`seZdZdZd�ZRS(s�Test deprecation of binary boolean `-`. While + and * are well
    defined, binary  - is not and even a corrected form seems to have
    no real uses.

    The deprecation process was started in NumPy 1.9.
    s,numpy boolean subtract, the `-` operator, .*cC`s]tjtg�}tjt�}|jtjd||f�|jtjd||f�dS(NR)(RR;RROR0RQtsub(RR;Rc((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_operator_deprecation�s(R2R3RMRRg(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRe�stTestRankDeprecationcB`seZdZd�ZRS(s�Test that np.rank is deprecated. The function should simply be
    removed. The VisibleDeprecationWarning may become unnecessary.
    cC`s)tjd�}ttjtj|�dS(Ni
(RRYRRtrank(RR9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest�s(R2R3RMRj(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRh�stTestComparisonDeprecationscB`sJeZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	RS(sPThis tests the deprecation, for non-element-wise comparison logic.
    This used to mean that when an error occurred during element-wise comparison
    (i.e. broadcasting) NotImplemented was returned, but also in the comparison
    itself, False was given instead of the error.

    Also test FutureWarning for the None comparison.
    s#elementwise.* comparison failed; .*cC`s�x�tjtjfD]�}|j|dtjd�gf�tjddd�}|j|d||d fdd�tjdtjdddg�gdt�}tjdtjdddg�gdt�}|j|d||fdd�qWdS(	NR)itdtypesi,ii����R%ii(	RQteqtneR0RRIR!R;tobject(RtopR9RD((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_normal_typess"#--cC`sQtjddg�}tjdddg�}ttd�||�|gkdS(NR9RDtccS`s
||kS(N((txty((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:s(RR;Rt
ValueError(RR9RD((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_stringsc
C`s�tj��Vtjddt�tttjtjd�d�tttj
tjd�d�WdQXtj��Vtjddt�tttjtjd�d�tttj
tjd�d�WdQXdS(NR
RiR(RRRR\RRQRmRRYR!RnR(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_none_comparisons
%
cC`stjdt���}tjddt�ttjd�dk�ttj	d�dk�ttj
d�dk�ttjd�dk�ttj	d�dk�ttj
d�dk�WdQXtt|�dk�ttjtj
d�d��dS(NRR
RiRjtNaTi(
RRRRR\RRtfloat32R!tstr_t
datetime64R"tequal(RR.((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_scalar_none_comparison*sc`s�dtfd��Y�|j�fd��|j�fd��tjddd��tjddd��tt�fd	��tt��fd
��tt�fd��tt��fd��dS(
NtNotArraycB`seZd�Zd�ZRS(cS`s
t�dS(N(RP(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt	__array__AscS`stS(N(tNotImplemented(Rtother((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt__ne__Es(R2R3RR�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR~@s	c`stjd���kS(Ni(RRY((R~(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Hsc`stjd���kS(Ni(RRY((R~(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:IsiRlsi4,i4si4,i4,i4c`s
�dkS(Ni(((tstruct1(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Nsc`s
��kS(N(((R�tstruct2(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Osc`s
�dkS(Ni(((R�(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Psc`s
��kS(N(((R�R�(sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:Qs(RoR0RRIRR\(R((R~R�R�sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt!test_void_dtype_equality_failures?sc
C`s�ttd��ttd��tj��xtjd�ttjd�dk�ttjd�dk�ttjd�dk�ttjd�dk�WdQXx�tj	d�tjd�gD]�}tj
ddd�}x�|dgD]�}x�tjtj
tjtjgD]o}tjdd	krntj��2}tjd
�tt|||�t|�WdQXqtt|||�qWq�Wq�WdS(NcS`stjd�dkS(NiR9(RRY(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:ZscS`stjd�dkS(NiR9(RRY(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:[sRiR9iRlsi4,i4iR
(RR\RRRRRR;tint16tasarrayRIRQtlttletgttgetsystversion_infoRRPR6(Rtarg1tstructtarg2tftl((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt'test_array_richcompare_legacy_weirdnessSs$

%%
(
R2R3RMRRqRvRwR}R�R�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRk�s	
		
		t"TestIdentityComparisonDeprecationscB`s/eZdZdZd�Zd�Zd�ZRS(sThis tests the equal and not_equal object ufuncs identity check
    deprecation. This was due to the usage of PyObject_RichCompareBool.

    This tests that for example for `a = np.array([np.nan], dtype=object)`
    `a == a` it is warned that False and not `np.nan is np.nan` is returned.

    Should be kept in sync with TestComparisonDeprecations and new tests
    added when the deprecation is over. Requires only removing of @identity@
    (and blocks) from the ufunc loops.c.src of the OBJECT comparisons.
    s6numpy .* will not check object identity in the future.cC`stjtjgdt�}tj��Dtjddt�tttj	||�tttj
||�WdQXtj���tjddt�tttj	||�tttj
||�tjdd��Etj
||�tj||�tj||�tj||�WdQXWdQXdS(NRlR
RRtinvalidR_(RR;tnanRoRRRR\RR|t	not_equalRterrstatetlesstgreatert
less_equalt
greater_equal(RR9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_identity_equality_mismatch�s

cC`sgdtfd��Y}tj|�g�}|jtjd||f�|jtjd||f�dS(Nt	FunkyTypecB`seZd�Zd�ZRS(cS`std��dS(NsI won't compare(RP(RR�((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt__eq__�scS`std��dS(NsI won't compare(RP(RR�((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��s(R2R3R�R�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��s	R)(RoRR;R0R|R�(RR�R9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_comparison_error�scC`sitjtjdddg�dgdt�}|jtjd||f�|jtjd||f�dS(NiiiRlR)(RR;R!RoR0R|R�(RR9((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_bool_error�s-(R2R3RMRR�R�R�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR�ss

		t"TestAlterdotRestoredotDeprecationscB`seZdZd�ZRS(s�The alterdot/restoredot functions are deprecated.

    These functions no longer do anything in numpy 1.10, so
    they should not be used.

    cC`s$|jtj�|jtj�dS(N(R0Rtalterdott
restoredot(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt$test_alterdot_restoredot_deprecation�s(R2R3RMR�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��st(TestBooleanIndexShapeMismatchDeprecationcB`seZdZdZd�ZRS(s�Tests deprecation for boolean indexing where the boolean array
    does not match the input array along the given dimensions.
    s)boolean index did not match indexed arraycC`s�tjd�}tjtg�}ttj|j|�tjtgd�}ttj|j|�tjddt	�}ttj|j|�ttj|jt
d�|f�dS(NiiiiRl(iii(ii(RtonesR;RRRRZR4RItbooltsliceR!(RtarrRR((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_simple�s	
	
	
	(R2R3RMRR�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��stTestFullDefaultDtypecB`seZdZd�ZRS(smnp.full defaults to float when dtype is not set.  In the future, it will
    use the fill value's dtype.
    cC`sFtttjdd�tttjdd�ttjddt�dS(Ni(RR\RtfullR!Rtfloat(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_full_default_dtype�s(R2R3RMR�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��stTestDatetime64TimezonecB`sReZdZd�Zejed�ejej	dd!dk�d���Z
RS(s{Parsing of datetime64 with timezones deprecated in 1.11.0, because
    datetime64 is now timezone naive rather than UTC only.

    It will be quite a while before we can remove this, because, at the very
    least, a lot of existing code uses the 'Z' modifier to avoid conversion
    from local time to UTC, even if otherwise it handles time in a timezone
    naive fashion.
    cC`s0|jtjdd�|jtjdd�dS(NR)s2000-01-01T00+01s2000-01-01T00Z(s2000-01-01T00+01(s2000-01-01T00Z(R0RR{(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyRv�ss!The pytz module is not available.iiicC`sMtjd�}tjdddddd|�}|jtjd|f�dS(Ns
US/Easterni�iittzinfoR)(tpytzttimezonetdatetimeR0RR{(Rttztdt((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt
test_datetime�s!(ii(R2R3RMRvR	tskipift	_has_pytztknownfailureifR�R�R�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��s	t!TestNonCContiguousViewDeprecationcB`seZdZd�ZRS(sIView of non-C-contiguous arrays deprecated in 1.11.0.

    The deprecation will not be raised for arrays that are both C and F
    contiguous, as C contiguous is dominant. There are more such arrays
    with relaxed stride checking than without so the deprecation is not
    as visible with relaxed stride checking in force.
    cC`sT|jtjd�jjdtjf�|jtjd�jjdtjf�dS(NiR)(ii(ii(R0RR�tTtviewtcomplextint8(R((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_fortran_contiguous�s((R2R3RMR�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��st8TestInvalidOrderParameterInputForFlattenArrayDeprecationcB`s eZdZd�Zd�ZRS(sdInvalid arguments to the ORDER parameter in array.flatten() should not be
    allowed and should raise an error.  However, in the interests of not breaking
    code that may inadvertently pass invalid arguments to this parameter, a
    DeprecationWarning will be issued instead for the time being to give developers
    time to refactor relevant code.
    cC`s8tjd�}d|_|j|jdtjf�dS(Niis_Non-string object detected for the array ordering. Please pass in 'C', 'F', 'A', or 'K' insteadR)(ii(RRIRR0tflattentpi(RRs((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt!test_flatten_array_non_string_args	cC`s2tjd�}d|_|j|jdd�dS(NiisdNon length-one string passed in for the array ordering. Please pass in 'C', 'F', 'A', or 'K' insteadR)tFACK(ii(R�(RRIRR0R�(RRs((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt%test_flatten_array_invalid_string_args	(R2R3RMR�R�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR��s	tTestTestDeprecatedcB`seZd�ZRS(cC`sCt�}|j�tt|jd��d�}|j|�dS(NcS`sdS(N(R!(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR:!scS`stjddt�dS(NtfooR(RtwarnR6(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR�#s(R5RRR R0(Rttest_case_instanceR�((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyttest_assert_deprecateds	

	(R2R3R�(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyR�st__main__((-RMt
__future__RRRR�R�RQRtnumpyRt
numpy.testingRRRRRRR	R�RR�tImportErrorR4RoR
R5R7RNRTRVR^RaReRhRkR�R�R�R�R�R�R�R�R2(((sU/opt/alt/python27/lib64/python2.7/site-packages/numpy/core/tests/test_deprecations.pyt<module>sB4


ge�
y4



Zerion Mini Shell 1.0