
x\c           @   sb   d  d l  Z d  d l Z d  d l m Z e j d    Z e j d    Z e j d    Z d S(   iN(   t   PandasArrayc         c   s1   |  j     } | j t d d  d VWd QXd S(   s  
    A monkeypatch to tell pandas to let us in.

    By default, passing a PandasArray to an index / series / frame
    constructor will unbox that PandasArray to an ndarray, and treat
    it as a non-EA column. We don't want people using EAs without
    reason.

    The mechanism for this is a check against ABCPandasArray
    in each constructor.

    But, for testing, we need to allow them in pandas. So we patch
    the _typ of PandasArray, so that we evade the ABCPandasArray
    check.
    t   _typt	   extensionN(   t   contextt   setattrR    (   t   monkeypatcht   m(    (    sE   lib/python2.7/site-packages/pandas/tests/extension/numpy_/conftest.pyt   allow_in_pandas   s    c           C   s   t  j S(   N(   t   npt   nan(    (    (    sE   lib/python2.7/site-packages/pandas/tests/extension/numpy_/conftest.pyt   na_value   s    c          C   s   d   }  |  S(   Nc         S   s   t  j |   o t  j |  S(   N(   R   t   isnan(   t   at   b(    (    sE   lib/python2.7/site-packages/pandas/tests/extension/numpy_/conftest.pyt   cmp$   s    (    (   R   (    (    sE   lib/python2.7/site-packages/pandas/tests/extension/numpy_/conftest.pyt   na_cmp"   s    	(	   t   numpyR   t   pytestt   pandas.core.arrays.numpy_R    t   fixtureR   R
   R   (    (    (    sE   lib/python2.7/site-packages/pandas/tests/extension/numpy_/conftest.pyt   <module>   s
   