ó
£áSc           @` s  d  Z  d d l m Z m Z m Z d d d d d d d	 d
 d d d d d g Z d d l Z d d l m Z d e	 f d „  ƒ  YZ
 d „  Z d d l m Z d d l m Z d „  Z d d „ Z d „  Z d „  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d S(   s1   Backward compatible with arrayfns from Numeric.

i    (   t   divisiont   absolute_importt   print_functiont	   array_sett
   construct3t   digitizet   errort	   find_maskt	   histogramt
   index_sortt   interpt   nzt   reverset   spant
   to_cornerst	   zmin_zmaxN(   t   asarrayc           B` s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR      s   c         C` s¡   t  | ƒ } | j d k r* t d ƒ ‚ n  t |  t j ƒ sK t d ƒ ‚ n  t  |  ƒ }  t  | ƒ } |  j | j k s„ |  j d k  r“ t d ƒ ‚ n  | |  | <d  S(   Ni   s   index array must be 1-ds   vals1 must be an ndarrays9   vals1 and vals2 must have same number of dimensions (>=1)(   R   t   ndimt
   ValueErrort
   isinstancet   npt   ndarrayt	   TypeErrorR   (   t   vals1t   indicest   vals2(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR      s    !(   R   (   t   bincountc         C` s   t  |  ƒ j d d ƒ S(   Nt   kindt   heap(   R   t   argsort(   t   arr(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR	      s    c         C` sZ   t  j | | |  ƒ } | d k s- | d k r1 | S| d k rJ | j d ƒ St d ƒ ‚ d S(   s=   y(z) interpolated by treating y(x) as piecewise function
    t   dt   fs   incompatible typecodeN(   R   R
   t   Nonet   astypeR   (   t   yt   xt   zt   typt   res(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR
   "   s    c         C` sZ   t  |  d t j ƒ}  |  j d k r3 t d ƒ ‚ n  t j |  d k ƒ } | d j ƒ  d S(   Nt   dtypei   s   intput must have 1 dimension.i    iÿÿÿÿ(   R   R   t   ubyteR   R   t   flatnonzerot   item(   R&   t   indxs(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   -   s
    c         C` s§   t  |  d d ƒ}  |  j d k r0 t d ƒ ‚ n  t j |  ƒ } | d k rq |  d  d  d … d  d  … f | d <n2 | d k r£ |  d  d  … d  d  d … f | d <n  | S(	   NR*   R!   i   s   input must be 2-di    iÿÿÿÿ.i   (   R   R   R   R   t
   empty_like(   R&   t   nR%   (    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   4   s    &&c         C` sR   t  j |  | | ƒ } | d k r% | St  j | | f | j ƒ } | | d <| Sd  S(   Ni    .(   R   t   linspacet   emptyR*   (   t   lot   hit   numt   d2R&   t   ret(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   ?   s    
c         C` s  t  |  d t ƒ}  t  | d t ƒ} |  j | j k sE |  j d k rT t d ƒ ‚ n  t j | ƒ \ } } | d } | d } | d k } | d k } | | @} t j | | | | | | | f }	 t j | | | | | | | f }
 |  |	 |
 f } | j	 ƒ  j
 ƒ  | j ƒ  j
 ƒ  f S(   NR*   i   s)   z and ireg must be the same shape and 2-di   i    (   R   t   floatt   intt   shapeR   R   R   t   nonzerot   r_t   minR-   t   max(   R'   t   iregt   ixt   iyt   x1mt   y1mt   i1t   i2t   i3t   nixt   niyt   zres(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   H   s    !


%%c         C` s
   t  ‚ d  S(   N(   t   NotImplementedError(   t   fst
   node_edges(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   [   s    c         C` s
   t  ‚ d  S(   N(   RJ   (   R    t   nvt   nvsum(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   ^   s    c         C` s
   t  ‚ d  S(   N(   RJ   (   t   maskt   itype(    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyR   b   s    (   t   __doc__t
   __future__R    R   R   t   __all__t   numpyR   R   t	   ExceptionR   R   R   R   R   R	   R#   R
   R   R   R   R   R   R   R   (    (    (    sS   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/arrayfns.pyt   <module>   s&   								