ó
ßüÚ\c           @   so   d  d l  Z d  d l m Z d  d l Z e j d  Z d  d l m Z m	 Z	 d   Z
 e j j d    Z d S(   iĸĸĸĸN(   t   assert_allcloset   sparse(   t   deserializet	   serializec          C   sŪ   t  j j d	  }  d |  |  d k  <t j |   } t |  \ } } d | d k sY t  t t |    } t | j | j  t | j	 | j	  t | j
   | j
    d  S(
   Ni   i   i   i   i    gé?R   t   type(   i   i   i   i   (   t   npt   randomR   t   COOR   t   AssertionErrorR   R    t   datat   coordst   todense(   t   xt   yt   headert   framest   z(    (    sE   lib/python2.7/site-packages/distributed/protocol/tests/test_sparse.pyt!   test_serialize_deserialize_sparse
   s    c          C   sg   d }  t  j |   } t  j |  d t  j } t j | g |  } t |  \ } } t | |  } d  S(   Ni áõt   dtype(   R   t   aranget   onest   int16R   R   R   R   (   t   nR   R	   t   sR   R   t   s2(    (    sE   lib/python2.7/site-packages/distributed/protocol/tests/test_sparse.pyt'   test_serialize_deserialize_sparse_large   s    (   t   numpyR   t   numpy.testingR    t   pytestt   importorskipR   t   distributed.protocolR   R   R   t   markt   slowR   (    (    (    sE   lib/python2.7/site-packages/distributed/protocol/tests/test_sparse.pyt   <module>   s   	