ó
£áSc           @` sÇ  d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l m	 Z	 d d l
 j j Z d d l j j Z d d l j j Z d d l m Z m Z m Z d d l m Z m Z d d l m Z m Z d d l j j Z d d l m Z m Z e j d d	 k r)e j Z e j d
 Z n e j  Z e j  d
 Z i  Z! i  Z" e Z# e# d ƒ Z$ d Z% d e& f d „  ƒ  YZ' d f  d „  ƒ  YZ( e( d ƒ Z) d Z* d d Z+ d Z, d Z- d Z. d „  Z/ d „  Z0 d „  Z1 d „  Z2 d „  Z3 d „  Z4 d „  Z5 d d d „ Z6 d „  Z7 d „  Z8 e9 d  „ Z: d! „  Z; d" „  Z< d# f  d$ „  ƒ  YZ= d% f  d& „  ƒ  YZ> d' f  d( „  ƒ  YZ? d) f  d* „  ƒ  YZ@ d+ f  d, „  ƒ  YZA d- f  d. „  ƒ  YZB d/ f  d0 „  ƒ  YZC d1 f  d2 „  ƒ  YZD eA e jE d3 e@ d3 ƒ ƒ ZE eA e jF d4 e? d3 ƒ ƒ ZF eA e jG d4 e? d3 ƒ ƒ ZG eA e jH ƒ ZH eA e jI ƒ ZI eA e jJ ƒ ZJ eA e jK ƒ ZK eA e jL d3 e> d ƒ ƒ ZL eA e jM d3 e= d5 d4 ƒ ƒ ZM eA e jN d3 e= d5 d4 ƒ ƒ ZN eA e jO ƒ ZO eA e jP ƒ ZP eA e jQ d4 e@ d4 ƒ ƒ ZQ eA e jR d3 e= d5 d6 d4 d6 ƒ ƒ ZR eA e jS ƒ ZS eA e jT ƒ ZT eA e jU ƒ ZU eA e jV ƒ ZV eA e jW ƒ ZW eA e jX ƒ ZX d7 „  ZY eA e jZ ƒ Z[ eA e j\ ƒ Z\ eA e j] ƒ Z] eA e j^ ƒ Z^ eD e j_ ƒ Z_ eD e j` ƒ Z` e9 e` _	 eD e ja d
 d
 ƒ Za eC e jb eB ƒ  d d
 ƒ Zb eC e jc eB ƒ  d d
 ƒ Zc eC e jd eB ƒ  d d
 ƒ Zd eC e je eB ƒ  d d
 ƒ Ze eC e jf eB ƒ  d d
 ƒ Zf eD e jg ƒ Zg eD e jh d3 d4 ƒ Zh e9 eh _	 eD e ji ƒ Zi e9 ei _	 eD e jj ƒ Zj e9 ej _	 eD e jk ƒ Zk e9 ek _	 eD e jl ƒ Zl e9 el _	 eD e jm ƒ Zm e9 em _	 eD e jn ƒ Zn e9 en _	 eD e jo ƒ Zo eD e jo d
 d
 ƒ j	 Zp eD e jq ƒ Zq eq j	 Zr eD e js ƒ Zs eD e jt ƒ Zt eD e ju ƒ Zu eD e jv ƒ Zv d8 „  Zw d9 „  Zx e9 d: „ Zy d; ez f d< „  ƒ  YZ{ e{ Z| d= „  Z} e} Z~ e} Z d
 d> d? d@ „ Z€ d
 dA „ Z� d> d? d
 dB „ Z‚ d
 dC „ Zƒ e9 d
 e9 dD „ Z„ e„ Z… dE „  Z† dF „  Z‡ dG „  Zˆ dH „  Z‰ e9 dI „ ZŠ dJ „  Z‹ e9 dK „ ZŒ e� dL „ ZŽ e� dM „ Z� e9 dN „ Z� e9 dO „ Z‘ e$ e9 dP „ Z’ e9 e9 dQ „ Z“ e9 e9 dR „ Z” e9 e9 d dS „ Z• dT „  Z– e9 dU dV „ Z— d
 dW „ Z˜ d
 dX „ Z™ d
 dY „ Zš d
 dZ „ Z› d
 d[ „ Zœ d
 d\ „ Z� d
 d] „ Zž d
 d^ „ ZŸ d
 d_ „ Z  d` „  Z¡ da „  Z¢ d db „ Z£ dc „  Z¤ e9 e9 dU dd „ Z¥ e9 de „ Z¦ dU df „ Z§ dg „  Z¨ dh „  Z© e© Zª di „  Z« e« Z¬ dj „  Z­ dk e9 dl „ Z® dm f  dn „  ƒ  YZ¯ e¯ ƒ  Z° do f  dp „  ƒ  YZ± e± ƒ  Z² dk e9 dq „ Z³ d d d
 dr „ Z´ d d d
 e9 e9 ds „ Zµ dk e9 e9 dt „ Z¶ dk e9 e9 du „ Z· dk e9 e9 dv „ Z¸ dw „  Z¹ e9 dx „ Zº dy „  Z» dz „  Z¼ e» ep ƒ e| _½ e» er ƒ e| _¾ e» e¸ ƒ e| _¸ e» e· ƒ e| _· e» e¶ ƒ e| _¶ e¿ e» e¼ ƒ ƒ e| _À e» e¼ ƒ e| _Á d{ „  ZÂ e» eÂ ƒ e| _— [Â e9 d| „ ZÃ e» eÃ ƒ e| _Ä e9 e9 d} „ ZÅ e» eÅ ƒ e| _® [Å e» eI ƒ e| _Æ e| _I e» e¼ ƒ e| _Ç e9 e9 e9 d~ „ ZÈ e» eÈ ƒ e| _É e9 e9 e9 d „ ZÊ e» eÊ ƒ e| _Ë e» e´ ƒ e| _´ e» e¼ ƒ e| _Ì e» e¼ ƒ e| _Í e» e¼ ƒ e| _Î e¿ e» e¼ ƒ ƒ e| _Ï e» e¢ ƒ e| _Ð e» e¼ ƒ e| _Ñ e9 e9 d€ „ ZÒ e» eÒ ƒ e| _Ó [Ò e9 e9 d� „ ZÔ e» eÔ ƒ e| _Õ [Ô e» e• ƒ e| _Ö e¿ e» e¼ ƒ ƒ e| _× e» e¼ ƒ e| _Ø e» eY ƒ e| _Y e» e” ƒ e| _Ù e9 e9 d‚ „ ZÚ e» eÚ ƒ e| _Û e» eŠ ƒ e| _Ü e» e‰ ƒ e| _‰ e» e¼ ƒ e| _Ý e» e¼ ƒ e| _Þ e» e¼ ƒ e| _ß e» e¼ ƒ e| _³ dƒ „  Zà e» eà ƒ e| _á e¿ e» e¼ ƒ ƒ e| _â e» e“ ƒ e| _“ d„ „  Zã e» eã ƒ e| _¤ e» e¥ ƒ e| _ä e» e¼ ƒ e| _å e» eµ ƒ e| _µ e» e¦ ƒ e| _¦ e9 e9 e9 d… „ Zæ e9 e9 e9 d† „ Zç e» eæ ƒ e| _è e» eç ƒ e| _é e» e¼ ƒ e| _ê e» e[ ƒ e| _ë [» [¼ e{ d eì d‡ d
 ƒZí d dˆ „ ZÜ d e9 d d‰ „ Zî d dŠ „ Zä d S(‹   s1  MA: a facility for dealing with missing observations

MA is generally used as a numpy.array look-alike.
by Paul F. Dubois.

Copyright 1999, 2000, 2001 Regents of the University of California.
Released for unlimited redistribution.
Adapted for numpy_core 2005 by Travis Oliphant and
(mainly) Paul Dubois.

i    (   t   divisiont   absolute_importt   print_functionN(   t   reduce(   t   newaxist   ndarrayt   inf(   t   amaxt   amin(   t   bool_t	   typecodes(   t   bytest   longi   i   gzø·¥•ª8t   MAErrorc           B` s#   e  Z d d  „ Z d „  Z e Z RS(   c         C` s(   t  | t ƒ s | f } n  | |  _ d S(   s   Create an exceptionN(   t
   isinstancet   tuplet   args(   t   selfR   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __init__.   s    c         C` s   t  |  j d ƒ S(   s#   Calculate the string representationi    (   t   strR   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __str__5   s    N(   t   __name__t
   __module__t   NoneR   R   t   __repr__(    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   -   s   	t   _MaskedPrintOptionc           B` sM   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d d „ Z d „  Z e Z	 RS(   s<   One instance of this class, masked_print_option, is created.c         C` s   |  j  | ƒ d |  _ d S(   s&   Create the masked print option object.i   N(   t   set_displayt   _enabled(   R   t   display(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   <   s    c         C` s   |  j  S(   s#   Show what prints for masked values.(   t   _display(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   A   s    c         C` s   | |  _  d S(   s2   set_display(s) sets what prints for masked values.N(   R   (   R   t   s(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   E   s    c         C` s   |  j  S(   s(   Is the use of the display value enabled?(   R   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   enabledI   s    i   c         C` s   | |  _  d S(   s   Set the enabling flag to flag.N(   R   (   R   t   flag(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   enableM   s    c         C` s   t  |  j ƒ S(   N(   R   R   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   Q   s    (
   R   R   t   __doc__R   R   R   R   R!   R   R   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   :   s   					s   --g@Œµx¯Dy                t   -i?B t   ?c         C` sþ   t  |  t ƒ r t St  |  t ƒ s1 t  |  t ƒ r5 t St  |  t ƒ rH t St  |  t ƒ r[ t	 St  |  t
 ƒ sy t  |  t ƒ rö |  j j } | t d k r™ t S| t d k r­ t S| t d k rÁ t	 S| t d k rÕ t S| t d k rò t j t ƒ St St Sd S(   s7   Function to calculate default fill value for an object.t   Floatt   Integert   Complext	   Charactert   UnsignedIntegerN(   R   t   floatt   default_real_fill_valuet   intR   t   default_integer_fill_valueR   t   default_character_fill_valuet   complext   default_complex_fill_valuet   MaskedArrayR   t   dtypet   charR
   t   umatht   absolutet   default_object_fill_value(   t   objt   x(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   default_fill_value`   s,    c         C` s´   t  |  t ƒ r t j St  |  t ƒ s4 t  |  t ƒ r8 t St  |  t ƒ sV t  |  t ƒ r¤ |  j	 j
 } | t d k ry t j S| t d k r� t S| t d k r° t Sn t d ƒ ‚ d S(   sD   Function to calculate default fill value suitable for taking minima.R%   R&   R)   s(   Unsuitable type for calculating minimum.N(   R   R*   t   numericR   R,   R   t   _MAXINTR1   R   R2   R3   R
   t	   TypeError(   R7   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   minimum_fill_valuez   s    c         C` s²   t  |  t ƒ r t St  |  t ƒ s2 t  |  t ƒ r7 t St  |  t ƒ sU t  |  t ƒ r¢ |  j j	 } | t
 d k rv t S| t
 d k r‹ t S| t
 d k r® d Sn t d ƒ ‚ d S(   sD   Function to calculate default fill value suitable for taking maxima.R%   R&   R)   i    s(   Unsuitable type for calculating maximum.N(   R   R*   R   R,   R   R;   R1   R   R2   R3   R
   R<   (   R7   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   maximum_fill_value‹   s    c         C` s    t  |  ƒ r |  j | ƒ n  d S(   s,   Set fill value of a if it is a masked array.N(   t   isMaskedArrayt   set_fill_value(   t   at
   fill_value(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR@   œ   s    c         C` s!   t  |  t ƒ r |  j ƒ  St Sd S(   s‰   Mask of values in a; could be nomask.
       Returns nomask if a is not a masked array.
       To get an array for sure use getmaskarray.N(   R   R1   t   raw_maskt   nomask(   RA   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   getmask¡   s    
c         C` s0   t  |  ƒ } | t k r( t t |  ƒ ƒ S| Sd S(   s¦   Mask of values in a; an array of zeros if mask is nomask
     or not a masked array, and is a byte-sized integer.
     Do not try to add up entries, for example.
    N(   RE   RD   t   make_mask_nonet   shape(   RA   t   m(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   getmaskarrayª   s    c         C` s-   y |  j  j t k SWn t k
 r( t SXd S(   s;   Is m a legal mask? Does not check contents, only type.
    N(   R2   t   typet   MaskTypet   AttributeErrort   False(   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   is_maskµ   s    c         C` s³   |  t  k r t  St |  t ƒ rp |  j j t k r^ | rU t j |  d t d | ƒ} qm |  } qˆ |  j t ƒ } n t	 |  t
 ƒ j t ƒ } | r« t j t j | ƒ ƒ r« t  S| Sd S(   s  make_mask(m, copy=0, flag=0)
       return m as a mask, creating a copy if necessary or requested.
       Can accept any sequence of integers or nomask. Does not check
       that contents must be 0s and 1s.
       if flag, return nomask if m contains no true elements.
    R2   t   copyN(   RD   R   R   R2   RJ   RK   R:   t   arrayt   astypet   filledt   Truet   fromnumerict   sometruet   ravel(   RH   RO   R    t   result(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   make_mask½   s    	c         C` s"   t  j |  d t ƒ} |  | _ | S(   s&   Return a mask of all zeros of shape s.R2   (   R:   t   zerosRK   RG   (   R   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRF   Ö   s    	c         C` s^   |  t  k r t | ƒ S| t  k r, t |  ƒ S|  | k rH t |  ƒ rH |  St t j |  | ƒ ƒ S(   s…   Logical or of the mask candidates m1 and m2, treating nomask as false.
       Result may equal m1 or m2 if the other is nomask.
     (   RD   RX   RN   R4   t
   logical_or(   t   m1t   m2(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   mask_orÜ   s     
 
 c         C` sl   t  |  t ƒ r |  j | ƒ St  |  t ƒ r< |  j d r< |  St  |  t ƒ r[ t j |  d ƒ St j |  ƒ Sd S(   s•  a as a contiguous numeric array with any masked areas replaced by value
    if value is None or the special element "masked", get_fill_value(a)
    is used instead.

    If a is already a contiguous numeric array, a itself is returned.

    filled(a) can be used to be sure that the result is numeric when
    passing an object a to other software ignorant of MA, in particular to
    numeric itself.
    t
   CONTIGUOUSt   ON(   R   R1   RR   R   t   flagst   dictR:   RP   (   RA   t   value(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRR   å   s    c         C` s+   t  |  ƒ r |  j ƒ  } n t |  ƒ } | S(   sb   
    The fill value of a, if it has one; otherwise, the default fill value
    for that type.
    (   R?   RB   R9   (   RA   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   get_fill_valueù   s    c         C` s,   t  |  ƒ } t  | ƒ } | | k r( | Sd S(   s:   The common fill_value of a and b, if there is one, or NoneN(   Rc   R   (   RA   t   bt   t1t   t2(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   common_fill_value  s
     t   domain_check_intervalc           B` s    e  Z d  Z d „  Z d „  Z RS(   s9   domain_check_interval(a,b)(x) = true where x < a or y > bc         C` s   | |  _  | |  _ d S(   s9   domain_check_interval(a,b)(x) = true where x < a or y > bN(   t   y1t   y2(   R   Ri   Rj   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR     s    	c         C` s.   t  j t  j | |  j ƒ t  j | |  j ƒ ƒ S(   s   Execute the call behavior.(   R4   RZ   t   greaterRj   t   lessRi   (   R   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __call__  s    (   R   R   R"   R   Rm   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRh     s   	t
   domain_tanc           B` s    e  Z d  Z d „  Z d „  Z RS(   s/   domain_tan(eps) = true where abs(cos(x)) < eps)c         C` s   | |  _  d S(   s/   domain_tan(eps) = true where abs(cos(x)) < eps)N(   t   eps(   R   Ro   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR     s    c         C` s%   t  j t  j t  j | ƒ ƒ |  j ƒ S(   s   Execute the call behavior.(   R4   Rl   R5   t   cosRo   (   R   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm     s    (   R   R   R"   R   Rm   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRn     s   	t   domain_greaterc           B` s    e  Z d  Z d „  Z d „  Z RS(   s(   domain_greater(v)(x) = true where x <= vc         C` s   | |  _  d S(   s(   domain_greater(v)(x) = true where x <= vN(   t   critical_value(   R   Rr   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   %  s    c         C` s   t  j | |  j ƒ S(   s   Execute the call behavior.(   R4   t
   less_equalRr   (   R   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   )  s    (   R   R   R"   R   Rm   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRq   #  s   	t   domain_greater_equalc           B` s    e  Z d  Z d „  Z d „  Z RS(   s-   domain_greater_equal(v)(x) = true where x < vc         C` s   | |  _  d S(   s-   domain_greater_equal(v)(x) = true where x < vN(   Rr   (   R   Rr   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   /  s    c         C` s   t  j | |  j ƒ S(   s   Execute the call behavior.(   R4   Rl   Rr   (   R   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   3  s    (   R   R   R"   R   Rm   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRt   -  s   	t   masked_unary_operationc           B` s)   e  Z d  d d „ Z d „  Z d „  Z RS(   i    c         C` sl   | |  _  | |  _ | |  _ t | d t | ƒ ƒ |  _ t | d t | ƒ ƒ |  _ | t | <| f t | <d S(   sÚ    masked_unary_operation(aufunc, fill=0, domain=None)
            aufunc(fill) must be defined
            self(x) returns aufunc(x)
            with masked values where domain(x) is true or getmask(x) is true.
        R"   R   N(	   t   ft   fillt   domaint   getattrR   R"   R   t   ufunc_domaint   ufunc_fills(   R   t   aufuncRw   Rx   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   8  s    			
c         O` sj   t  | ƒ } t | |  j ƒ } |  j d k	 rH t | |  j | ƒ ƒ } n  |  j | | | Ž } t | | ƒ S(   s   Execute the call behavior.N(   RE   RR   Rw   Rx   R   R]   Rv   t   masked_array(   R   RA   R   t   kwargsRH   t   d1RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   F  s    c         C` s   d t  |  j ƒ S(   Ns   Masked version of (   R   Rv   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   P  s    N(   R   R   R   R   Rm   R   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRu   7  s   	
t   domain_safe_dividec           B` s   e  Z e d  „ Z d „  Z RS(   c         C` s   | |  _  d  S(   N(   t	   tolerance(   R   R�   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   U  s    c         C` s#   t  j | ƒ |  j t  j | ƒ k S(   N(   R4   R5   R�   (   R   RA   Rd   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   W  s    (   R   R   t   divide_toleranceR   Rm   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR€   T  s   t   domained_binary_operationc           B` s/   e  Z d  Z d d d „ Z d „  Z d „  Z RS(   sœ   Binary operations that have a domain, like divide. These are complicated
       so they are a separate class. They have no reduce, outer or accumulate.
    i    c         C` sx   | |  _  | |  _ | |  _ | |  _ t | d t | ƒ ƒ |  _ t | d t | ƒ ƒ |  _ | t | <| | f t	 | <d S(   sj   abfunc(fillx, filly) must be defined.
           abfunc(x, filly) = x for all x to enable reduce.
        R"   R   N(
   Rv   Rx   t   fillxt   fillyRy   R   R"   R   Rz   R{   (   R   t   abfuncRx   R„   R…   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   ^  s    				
c   
      C` sµ   t  | ƒ } t  | ƒ } t | |  j ƒ } t | |  j ƒ } |  j | | ƒ } t j | d ƒ r‡ t | |  j | ƒ } t	 | | ƒ } n  t	 | | ƒ } |  j
 | | ƒ }	 t |	 | ƒ S(   s   Execute the call behavior.N(   RE   RR   R„   R…   Rx   RT   RU   R   t   whereR]   Rv   R}   (
   R   RA   Rd   t   mat   mbR   t   d2t   tRH   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   k  s    c         C` s   d t  |  j ƒ S(   Ns   Masked version of (   R   Rv   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   z  s    (   R   R   R"   R   Rm   R   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRƒ   Z  s   	t   masked_binary_operationc           B` sM   e  Z d  d  d „ Z d „  Z d  d d „ Z d „  Z d  d „ Z d „  Z RS(   i    c         C` sT   | |  _  | |  _ | |  _ t | d t | ƒ ƒ |  _ d t | <| | f t | <d S(   sj   abfunc(fillx, filly) must be defined.
           abfunc(x, filly) = x for all x to enable reduce.
        R"   N(	   Rv   R„   R…   Ry   R   R"   R   Rz   R{   (   R   R†   R„   R…   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   ~  s    			
c   	      O` s²   t  t | ƒ t | ƒ ƒ } t | |  j ƒ } t | |  j ƒ } |  j | | | | Ž } t | t ƒ r¥ | j d k r¥ | j	 | j	 k r¥ t  t
 | ƒ t
 | ƒ ƒ } n  t | | ƒ S(   s   Execute the call behavior.i    (   R]   RE   RR   R„   R…   Rv   R   R   t   ndimRG   RI   R}   (	   R   RA   Rd   R   R~   RH   R   RŠ   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   ‰  s    c         C` s  t  | ƒ } t | |  j ƒ } | j d k ri | j d ƒ } | t k	 ri t | d d ƒ} d | _ qi n  | t k r� |  j j | | ƒ } nT t	 | | ƒ } |  j j t | |  j ƒ | d | pÆ | j
 ƒ} t j j | | ƒ } t | t ƒ rt	 | | t | ƒ ƒ S| rt S| Sd S(   s6   Reduce target along the given axis with this function.i   RO   R2   N(    (   i   (   RE   RR   R…   RG   t   reshapeRD   RX   Rv   R   R}   R2   R4   t   logical_andR   R   Rc   t   masked(   R   t   targett   axisR2   RH   R‹   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   •  s$    c         C` s�   t  | ƒ } t  | ƒ } | t k r9 | t k r9 t } n* t | ƒ } t | ƒ } t j | | ƒ } |  j j t | |  j ƒ t | |  j ƒ ƒ } t	 | | ƒ S(   s<   Return the function applied to the outer product of a and b.(
   RE   RD   RI   RZ   t   outerRv   RR   R„   R…   R}   (   R   RA   Rd   Rˆ   R‰   RH   t   d(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR“   ®  s    	-c         C` s+   t  | |  j ƒ } t |  j j | | ƒ ƒ S(   s=   Accumulate target along axis after filling with y fill value.(   RR   R…   R}   Rv   t
   accumulate(   R   R‘   R’   R‹   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR•   »  s    c         C` s   d t  |  j ƒ S(   Ns   Masked version of (   R   Rv   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   ¿  s    N(	   R   R   R   Rm   R   R   R“   R•   R   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRŒ   }  s   		g        g      ð?g      ð¿gVçž¯Ò<c         C` s   t  j t |  d ƒ j ƒ  ƒ S(   sS   returns the indices of the elements of a which are not zero
    and not masked
    i    (   R:   t   asarrayRR   t   nonzero(   RA   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR—   Ø  s    c         C` s   t  j t |  ƒ ƒ S(   N(   RT   t   rankRR   (   t   object(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR˜     s    c         C` s   t  j t |  ƒ ƒ S(   N(   RT   RG   RR   (   R™   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRG     s    c         C` s   t  j t |  ƒ | ƒ S(   N(   RT   t   sizeRR   (   R™   R’   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRš   
  s    R1   c           B` s(  e  Z d  Z d Z d_ e e e d_ d „ Z d_ d_ d „ Z	 d_ d „ Z
 d „  Z d „  Z d „  Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e Z e Z  e Z! d „  Z" d „  Z# d „  Z$ d „  Z% e% Z& d „  Z' d „  Z( d „  Z) d  „  Z* d! „  Z+ d" „  Z, d# „  Z- e- Z. d$ „  Z/ d% „  Z0 d& „  Z1 d' „  Z2 d( „  Z3 d) „  Z4 d_ d* „ Z5 d+ „  Z6 d, „  Z7 d- „  Z8 d. „  Z9 d/ „  Z: d0 „  Z; d1 „  Z< d2 „  Z= d3 „  Z> d4 „  Z? d5 „  Z@ d6 „  ZA d7 „  ZB d8 „  ZC d_ d9 „ ZD d: „  ZE d; „  ZF d_ d< „ ZG d= „  ZH d> „  ZI d? „  ZJ d@ „  ZK dA „  ZL dB „  ZM dC „  ZN dD „  ZO eP dE eO dF dG ƒ ZQ dH „  ZR eP dE eR dF dI ƒ ZS dJ „  ZT d_ dK „ ZU dL „  ZV eP eV dF eW jX jY j ƒZY dM „  ZZ eP dE eZ dF dN ƒ Z[ dO „  Z\ eP dE e\ dF dP ƒ Z] dQ „  Z^ dR „  Z_ d_ dS „ Z` d_ dT „ Za dU „  Zb dV „  Zc dW „  Zd dX „  Ze eP e e dF dY ƒZf eP e e dF dZ ƒZg eP e e dF d[ ƒZh eP e e dF d\ ƒZi ei Zj eP ed d_ dF d] ƒZk eP ee d_ dF d^ ƒZl RS(`   sœ  Arrays with possibly masked values.
       Masked values of 1 exclude the corresponding element from
       any computation.

       Construction:
           x = array(data, dtype=None, copy=True, order=False,
                     mask = nomask, fill_value=None)

       If copy=False, every effort is made not to copy the data:
           If data is a MaskedArray, and argument mask=nomask,
           then the candidate data is data.data and the
           mask used is data.mask. If data is a numeric array,
           it is used as the candidate raw data.
           If dtype is not None and
           is != data.dtype.char then a data copy is required.
           Otherwise, the candidate is used.

       If a data copy is required, raw data stored is the result of:
       numeric.array(data, dtype=dtype.char, copy=copy)

       If mask is nomask there are no masked values. Otherwise mask must
       be convertible to an array of booleans with the same shape as x.

       fill_value is used to fill in masked values when necessary,
       such as when printing and in method/function filled().
       The fill_value is not used for computation within this module.
    g333333$@c         C` sÙ  | d k r d } n t j | ƒ } | } t | t ƒ r¢ | j }	 | d k rZ |	 j } n | |	 j k rr t } n  | t k rŠ | j } q| t k	 rt } qnx t | t	 ƒ rê | }	 | d k rÏ |	 j } q| |	 j k rt } qn0 t
 } t j | d | d t d | ƒ}	 |	 j } | rk| |	 j k rVt j |	 d | d t d | ƒ|  _ qt|	 j | ƒ |  _ n	 |	 |  _ | t k r•t |  _ d |  _ n3t | ƒ |  _ |  j t k r¿d |  _ n	|  j | k |  _ t |  j ƒ }
 t |  j ƒ } |
 | k r|
 d k r1t j |  j |  j j ƒ |  _ d |  _ qÈ| d k rpt j |  j |  j j ƒ |  _ |  j j |  j _ qÈt d ƒ ‚ nI |
 d k rÈt |  j ƒ t |  j ƒ k rÈ|  j ƒ  |  j j |  j _ n  |  j | ƒ d S(   s°   array(data, dtype=None, copy=True, order=False, mask=nomask, fill_value=None)
           If data already a numeric array, its dtype becomes the default value of dtype.
        R2   RO   t   orderi    i   s   Mask and data not compatible.N(   R   R:   R2   R   R1   t   dataRS   RD   t   maskR   RM   RP   t   _dataRQ   t   _maskt   _shared_maskRX   Rš   RT   t   resizeRG   R   t   unshare_maskR@   (   R   Rœ   R2   RO   R›   R�   RB   t   tct   need_data_copiedt   ct   nmt   nd(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   *  sb    			!	'		*
c         C` sÎ   |  j  t k	 r­ t j |  j  ƒ j ƒ  r˜ | d k rG t j d ƒ |  j S| \ } } } t	 j
 | ƒ } | d k r„ t d | ƒ ‚ n  |  j | | ƒ Sq­ t |  _  d |  _ n  | rÃ |  j j | ƒ S|  j Sd S(   s:   Special hook for numeric. Converts to numeric if possible.si   Cannot automatically convert masked array to numeric because data
    is masked in one or more locations.s   %s not known to mai    N(   RŸ   RD   RT   RV   t   anyR   t   warningst   warnRž   R{   t   getR   RR   R    RQ   (   R   R‹   t   contextt   funcR   t   it   fills(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   __array__l  s    	c   	   	   C` s'  | d k r" t | d t d t ƒS| d  \ } } t | } t t g  | D] } t | ƒ ^ qI ƒ } | d k	 r§ t | | g  | D] } t | d | ƒ ^ q€ Œ  ƒ } n  | t k	 ry | j	 } Wn t
 k
 rÓ qX| j	 | k rt t g  | D] } t | ƒ ^ qð ƒ } qn  t | d t d | ƒS(   sp   Special hook for ufuncs.

        Wraps the numpy array and sets the mask according to
        context.
        RO   R�   i   Rž   N(   R   R1   RM   RD   Rz   R   R]   RE   Ry   RG   RL   RI   (	   R   RP   R¬   R­   R   Rx   RA   RH   RG   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __array_wrap__ˆ  s     
(+.c         C` s
   |  j  j S(   s   Return the current shape.(   Rž   RG   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   _get_shape¡  s    c         C` s@   | |  j  _ |  j t k	 r< |  j j ƒ  |  _ | |  j _ n  d S(   s   Set the array's shape.N(   Rž   RG   RŸ   RD   RO   (   R   t   newshape(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   _set_shape¥  s    c         C` sf   |  j  t k r4 t |  j j ƒ  d t d |  j ƒ  ƒSt |  j j ƒ  d |  j  j ƒ  d |  j ƒ  ƒSd S(   s"   Calculate the flat value.
        R�   RB   N(   RŸ   RD   R}   Rž   RV   RB   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _get_flat¬  s    c         C` s   |  j  ƒ  } | | (d S(   s   x.flat = valueN(   RV   (   R   Rb   t   y(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _set_flat·  s    c         C` sZ   |  j  t k r1 t |  j j d t d |  j ƒ  ƒSt |  j j d |  j  d |  j ƒ  ƒSd S(   s%   Get the real part of a complex array.R�   RB   N(   RŸ   RD   R}   Rž   t   realRB   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _get_real¼  s
    c         C` s   |  j  } | | d <d S(   s   x.real = value.N(   R¸   (   R   Rb   R¶   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _set_realÅ  s    	c         C` sZ   |  j  t k r1 t |  j j d t d |  j ƒ  ƒSt |  j j d |  j  d |  j ƒ  ƒSd S(   s*   Get the imaginary part of a complex array.R�   RB   N(   RŸ   RD   R}   Rž   t   imagRB   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _get_imaginaryÊ  s
    c         C` s   |  j  } | | d <d S(   s   x.imaginary = value.N(   t	   imaginary(   R   Rb   R¶   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _set_imaginaryÓ  s    	c         C` s“   t  j ƒ  rn t  } |  t k r( t | ƒ S|  j } | t k	 r\ | j d k r\ | r\ t | ƒ S|  j t ƒ }  n |  j	 ƒ  } |  j
 | ƒ } t | ƒ S(   s}   Calculate the str representation, using masked for fill if
           it is enabled. Otherwise fill with fill value.
        (    (   t   masked_print_optionR   R�   R   RŸ   RD   RG   RQ   R™   RB   RR   (   R   Rv   RH   t   res(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   Ø  s    
	!
c         C` sr  d } d } d } d } t  |  j ƒ } |  j t k rx | d k r] | i t |  j ƒ  ƒ d 6S| i t |  j ƒ  ƒ d 6S| d k rÂ | i t |  j ƒ  ƒ d 6t |  j ƒ d 6t |  j ƒ  ƒ d 6S| i t |  j ƒ  ƒ d 6t |  j ƒ d 6t |  j ƒ  ƒ d 6Sd } |  j t k r0| i t |  j ƒ  ƒ d 6S| i t |  j ƒ  ƒ d 6t |  j ƒ d 6t |  j ƒ  ƒ d 6Sd	 S(
   s~   Calculate the repr representation, using masked for fill if
           it is enabled. Otherwise fill with fill value.
        sK   array(data =
 %(data)s,
      mask =
 %(mask)s,
      fill_value=%(fill)s)
sI   array(data = %(data)s,
      mask = %(mask)s,
      fill_value=%(fill)s)
s   array(
 %(data)s)s   array(%(data)s)i   Rœ   R�   Rw   N(   t   lenRG   RŸ   RD   R   RR   RB   (   R   t	   with_maskt
   with_mask1t   without_maskt   without_mask1t   n(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   î  s2    
c         C` s;   |  j  ƒ  |  j t k	 r( t d ƒ ‚ n  t |  j j ƒ  ƒ S(   s   Convert self to float.s0   Cannot convert masked element to a Python float.(   t   unmaskRŸ   RD   R   R*   Rœ   t   item(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   __float__  s    
c         C` s;   |  j  ƒ  |  j t k	 r( t d ƒ ‚ n  t |  j j ƒ  ƒ S(   s   Convert self to int.s.   Cannot convert masked element to a Python int.(   RÇ   RŸ   RD   R   R,   Rœ   RÈ   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __int__$  s    
c         C` s²   |  j  ƒ  |  j } |  j | } | t k rn y* | j d k rB | St | d |  j ƒSWqn t k
 rj | SXn  | | } | j d k r˜ | r‘ t S| Sn t | | d |  j ƒSd S(   s<   Get item described by i. Not a copy as in previous versions.i   RB   N(	   R¢   RŸ   Rž   RD   Rš   R}   t   _fill_valueRL   R�   (   R   R®   RH   t   doutt   mi(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __getitem__+  s     
	
c         C` s&  |  j  } |  t k r$ t d ƒ ‚ n  | t k rx |  j t k r] t | j ƒ |  _ t |  _ n
 |  j	 ƒ  t
 |  j | <d St | ƒ } t | ƒ j | j ƒ } | | | <| t k rÞ |  j t k	 r"|  j	 ƒ  t |  j | <q"nD |  j t k rt | j ƒ |  _ t
 |  _ n
 |  j	 ƒ  | |  j | <d S(   sF   Set item described by index. If value is masked, mask those locations.s   Cannot alter masked elements.N(   Rž   R�   R   RŸ   RD   RF   RG   RM   R    R¢   RS   RE   RR   RQ   R2   (   R   t   indexRb   R”   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __setitem__F  s,    	



c         C` sF   |  j  } |  j } t | t k	 r- | j ƒ  pB | t k	 oB | j ƒ  ƒ S(   s;   returns true if any element is non-zero or masked

        (   RŸ   Rž   t   boolRD   R¨   (   R   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __nonzero__b  s    		c         C` sF   |  j  } |  j } t | t k	 r- | j ƒ  pB | t k	 oB | j ƒ  ƒ S(   s;   returns true if any element is non-zero or masked

        (   RŸ   Rž   RÑ   RD   R¨   (   R   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __bool__n  s    		c         C` s   t  |  j ƒ S(   se   Return length of first dimension. This is weird but Python's
         slicing behavior depends on it.(   RÁ   Rž   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __len__z  s    c         C` s   t  |  | ƒ S(   s   Return bitwise_and(   t   bitwise_and(   R   t   other(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __and__  s    c         C` s   t  |  | ƒ S(   s   Return bitwise_or(   t
   bitwise_or(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __or__ƒ  s    c         C` s   t  |  | ƒ S(   s   Return bitwise_xor(   t   bitwise_xor(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __xor__‡  s    c         C` s
   t  |  ƒ S(   s   Return absolute(self)(   R5   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __abs__�  s    c         C` s
   t  |  ƒ S(   s   Return negative(self)(   t   negative(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __neg__“  s    c         C` s
   t  |  ƒ S(   s   Return array(self)(   RP   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __pos__—  s    c         C` s   t  |  | ƒ S(   s   Return add(self, other)(   t   add(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __add__›  s    c         C` s   t  |  | ƒ S(   s   Return remainder(self, other)(   t	   remainder(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __mod__¡  s    c         C` s   t  | |  ƒ S(   s   Return remainder(other, self)(   Râ   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __rmod__¥  s    c         C` s   t  |  | ƒ S(   N(   t
   left_shift(   R   RÆ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   __lshift__©  s    c         C` s   t  |  | ƒ S(   N(   t   right_shift(   R   RÆ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   __rshift__¬  s    c         C` s   t  |  | ƒ S(   s   Return subtract(self, other)(   t   subtract(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __sub__¯  s    c         C` s   t  | |  ƒ S(   s   Return subtract(other, self)(   Ré   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __rsub__³  s    c         C` s   t  |  | ƒ S(   s   Return multiply(self, other)(   t   multiply(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __mul__·  s    c         C` s   t  |  | ƒ S(   s   Return divide(self, other)(   t   divide(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __div__½  s    c         C` s   t  | |  ƒ S(   s   Return divide(other, self)(   Rî   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __rdiv__Á  s    c         C` s   t  |  | ƒ S(   s   Return divide(self, other)(   t   true_divide(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __truediv__Å  s    c         C` s   t  | |  ƒ S(   s   Return divide(other, self)(   Rñ   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __rtruediv__É  s    c         C` s   t  |  | ƒ S(   s   Return divide(self, other)(   t   floor_divide(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __floordiv__Í  s    c         C` s   t  | |  ƒ S(   s   Return divide(other, self)(   Rô   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __rfloordiv__Ñ  s    c         C` s   t  |  | | ƒ S(   s    Return power(self, other, third)(   t   power(   R   RÖ   t   third(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __pow__Õ  s    c         C` s
   t  |  ƒ S(   s   Return sqrt(self)(   t   sqrt(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __sqrt__Ù  s    c         C` sù  |  j  j j } t | d ƒ } | j j } | | k r9 n5| t d k rz | t d k rk | j | ƒ } qnt d ƒ ‚ nô | t d k rÝ | t d k r¬ | j | ƒ } qn| t d k rÎ | j | ƒ } qnt d ƒ ‚ n‘ | t d k rb| t d k r| j | ƒ } qn| t d k r1| j | ƒ } qn| t d k rS| j | ƒ } qnt d ƒ ‚ n t d ƒ ‚ |  j t k r³|  j  | 7_  t	 | ƒ } | |  _ | t k	 |  _
 nB t |  t | d t	 | ƒ ƒƒ } | j |  _  | j |  _ d |  _
 |  S(   s   Add other to self in place.i    R&   s&   Incorrect type for in-place operation.R%   R'   R�   i   (   Rž   R2   R3   RR   R
   RQ   R<   RŸ   RD   RE   R    Rà   R}   Rœ   R�   (   R   RÖ   R‹   Rv   Re   RH   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __iadd__Ý  sD    	!	c         C` sù  |  j  j j } t | d ƒ } | j j } | | k r9 n5| t d k rz | t d k rk | j | ƒ } qnt d ƒ ‚ nô | t d k rÝ | t d k r¬ | j | ƒ } qn| t d k rÎ | j | ƒ } qnt d ƒ ‚ n‘ | t d k rb| t d k r| j | ƒ } qn| t d k r1| j | ƒ } qn| t d k rS| j | ƒ } qnt d ƒ ‚ n t d ƒ ‚ |  j t k r³|  j  | 9_  t	 | ƒ } | |  _ | t k	 |  _
 nB t |  t | d t	 | ƒ ƒƒ } | j |  _  | j |  _ d |  _
 |  S(   s   Add other to self in place.i    R&   s&   Incorrect type for in-place operation.R%   R'   R�   i   (   Rž   R2   R3   RR   R
   RQ   R<   RŸ   RD   RE   R    Rì   R}   Rœ   R�   (   R   RÖ   R‹   Rv   Re   RH   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __imul__  sD    	!	c         C` sù  |  j  j j } t | d ƒ } | j j } | | k r9 n5| t d k rz | t d k rk | j | ƒ } qnt d ƒ ‚ nô | t d k rÝ | t d k r¬ | j | ƒ } qn| t d k rÎ | j | ƒ } qnt d ƒ ‚ n‘ | t d k rb| t d k r| j | ƒ } qn| t d k r1| j | ƒ } qn| t d k rS| j | ƒ } qnt d ƒ ‚ n t d ƒ ‚ |  j t k r³|  j  | 8_  t	 | ƒ } | |  _ | t k	 |  _
 nB t |  t | d t	 | ƒ ƒƒ } | j |  _  | j |  _ d |  _
 |  S(   s"   Subtract other from self in place.i    R&   s&   Incorrect type for in-place operation.R%   R'   R�   i   (   Rž   R2   R3   RR   R
   RQ   R<   RŸ   RD   RE   R    Ré   R}   Rœ   R�   (   R   RÖ   R‹   Rv   Re   RH   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __isub__3  sD    	!	c         C` sÕ  |  j  j j } t | d ƒ } | j j } | | k r9 n5| t d k rz | t d k rk | j | ƒ } qnt d ƒ ‚ nô | t d k rÝ | t d k r¬ | j | ƒ } qn| t d k rÎ | j | ƒ } qnt d ƒ ‚ n‘ | t d k rb| t d k r| j | ƒ } qn| t d k r1| j | ƒ } qn| t d k rS| j | ƒ } qnt d ƒ ‚ n t d ƒ ‚ t | ƒ } t |  t	 | d | ƒƒ } | j
 |  _  | j ƒ  } | |  j k	 rÑ| |  _ d |  _ n  |  S(   s   Divide self by other in place.i    R&   s&   Incorrect type for in-place operation.R%   R'   R�   i   (   Rž   R2   R3   RR   R
   RQ   R<   RE   Rî   R}   Rœ   RC   RŸ   R    (   R   RÖ   R‹   Rv   Re   t   moRW   t   dm(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __idiv__`  s@    	c         C` s   t  |  | ƒ S(   N(   t   equal(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __eq__‡  s    c         C` s   t  |  | ƒ S(   N(   t	   not_equal(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __ne__Š  s    c         C` s   t  |  | ƒ S(   N(   Rl   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __lt__�  s    c         C` s   t  |  | ƒ S(   N(   Rs   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __le__�  s    c         C` s   t  |  | ƒ S(   N(   Rk   (   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __gt__“  s    c         C` s   t  |  | ƒ S(   N(   t   greater_equal(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   __ge__–  s    c         C` s%   |  j  j | ƒ } t | d |  j ƒS(   s#   return self as array of given type.R�   (   Rž   RQ   RP   RŸ   (   R   R£   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRQ   ™  s    c         C` s   |  j  j ƒ  S(   s‰   Returns the raw data field, byte_swapped. Included for consistency
         with numeric but doesn't make sense in this context.
        (   Rž   t   byte_swapped(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  ž  s    c         C` sg   t  j |  j ƒ } |  j t k r+ t | ƒ Sd t  j |  j ƒ } t  j | | ƒ } t | d d ƒSd S(   s'   A 1-D array of all the non-masked data.i   RO   i    N(   RT   RV   Rž   RŸ   RD   RP   t   compress(   R   R”   RH   R¥   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   compressed¤  s    
c   
      C` s1  |  j  } |  j j } t | ƒ } | t k r› | d k r= d S| d k rQ | d S| d k rm t d „  | ƒ S| | } t | ƒ } | | =t | ƒ | Sn  | d k rþ t	 j
 | ƒ j t ƒ } t | ƒ } | d k rä | d }	 n t j j | ƒ }	 | |	 St | | ƒ } t | j t ƒ | ƒ }	 | |	 Sd S(   s?   Count of the non-masked elements in a, or along a certain axis.i    i   c         S` s   |  | S(   N(    (   R8   R¶   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   <lambda>¹  s    N(   RŸ   Rž   RG   RÁ   RD   R   R   t   listt   onesRT   RV   RQ   R,   Rš   R4   Rà   t   sum(
   R   R’   RH   R   t   lsRÆ   R‹   t   wt   n1t   n2(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   count®  s0    	
c         C` s   t  |  | ƒ S(   s%   s.dot(other) = innerproduct(s, other)(   t   innerproduct(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   dotÌ  s    c         C` s   |  j  S(   s   Get the current fill value.(   RË   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRB   Ð  s    c         C` s  |  j  } |  j } | t k r< | j d r/ | S| j ƒ  SnÂ | d k rT |  j } n | } |  t k rx t j	 | ƒ } n‚ y, t j	 | d | j
 d d ƒ} | | | <WnS t t f k
 rù t j	 | d t ƒ} | j t ƒ } t j | | | f ƒ } n X| Sd S(   s  A numeric array with masked values filled. If fill_value is None,
           use self.fill_value().

           If mask is nomask, copy data only if not contiguous.
           Result is always a contiguous, numeric array.
# Is contiguous really necessary now?
        R^   R2   RO   i   N(   Rž   RŸ   RD   R`   RO   R   RË   R�   R:   RP   R2   R<   RL   R™   RQ   RT   t   choose(   R   RB   R”   RH   Rb   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRR   Ô  s&    		c         C` s   t  |  j ƒ t  |  j ƒ f S(   s)   Return the ids of the data and mask areas(   t   idRž   RŸ   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   idsö  s    c         C` s   |  j  j d S(   s   Is the data contiguous?R^   (   Rž   R`   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   iscontiguousú  s    c         C` s
   |  j  j S(   s   Item size of each data item.(   Rž   t   itemsize(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  þ  s    c         C` s   t  |  | ƒ S(   s'   s.outer(other) = outerproduct(s, other)(   t   outerproduct(   R   RÖ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR“     s    c         C` sl   t  j |  j ƒ } |  j } |  j t k r3 | } n t j d |  j | ƒ } t | ƒ j	 | j
 ƒ | | <d S(   s[   Set the non-masked entries of self to filled(values).
           No change to mask
        i   N(   R:   t   arangeRš   Rž   RŸ   RD   RT   R  RR   RQ   R2   (   R   t   valuest   iotaR”   t   ind(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   put  s    		c         C` sP   |  j  } |  j t k	 rL t | ƒ j | j ƒ | |  j <d |  _ t |  _ n  d S(   s]   Set the masked entries of self to filled(values).
           Mask changed to nomask.
        i    N(   Rž   RŸ   RD   RR   RQ   R2   R    (   R   R   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   putmask  s
    		c         C` sE   |  j  t k r" t |  j j ƒ  ƒ St |  j j ƒ  |  j  j ƒ  ƒ Sd S(   s   Return a 1-D view of self.N(   RŸ   RD   R}   Rž   RV   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRV     s    c         C` s   |  j  S(   s�    Obsolete; use data property instead.
            The raw data; portions may be meaningless.
            May be noncontiguous. Expert use only.(   Rž   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   raw_data$  s    t   fgett   docs9   The data, but values at masked locations are meaningless.c         C` s   |  j  S(   sa    Obsolete; use mask property instead.
            May be noncontiguous. Expert use only.
        (   RŸ   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRC   ,  s    s@   The mask, may be nomask. Values where mask true are meaningless.c         G` sJ   |  j  j | Œ  } |  j t k r+ t | ƒ S|  j j | Œ  } t | | ƒ S(   s   This array reshaped to shape s(   Rž   RŽ   RŸ   RD   R}   (   R   R   R”   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRŽ   4  s
    
c         C` s.   | d k r! t |  j ƒ  ƒ } n  | |  _ d S(   s3   Set the fill value to v. Omit v to restore default.N(   R   R9   R%  RË   (   R   t   v(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR@   =  s    c         C` s
   |  j  j S(   N(   Rž   R�   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _get_ndimC  s    c         C` s
   |  j  j S(   N(   Rž   Rš   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _get_sizeG  s    s    Number of elements in the array.c         C` s
   |  j  j S(   N(   Rž   R2   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   _get_dtypeL  s    s   type of the array elements.c         G` s[   |  j  t k	 rK |  j  j | Œ  } y | d r2 t SWqK t k
 rG t SXn  |  j j | Œ  S(   s    Return Python scalar if possiblei    (   RŸ   RD   RÈ   R�   t
   IndexErrorRž   (   R   R   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRÈ   P  s    
c         G` s"   | d } | d  } | |  | <d S(   s   Set Python scalar into arrayiÿÿÿÿN(    (   R   R   RÈ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   itemset[  s    

c         C` s   |  j  | ƒ j ƒ  S(   s   Convert to list(   RR   t   tolist(   R   RB   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR.  a  s    c         C` s   |  j  | ƒ j ƒ  S(   s   Convert to string(   RR   t   tostring(   R   RB   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR/  e  s    c         C` sM   |  j  t k r d St |  j  d d ƒ} | t k rI t |  _  d |  _ n  d S(   s'   Replace the mask by nomask if possible.NR    i   i    (   RŸ   RD   RX   R    (   R   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRÇ   i  s     	c         C` s7   |  j  r3 t |  j d d d d ƒ|  _ d |  _  n  d S(   s'   If currently sharing mask, make a copy.RO   i   R    i    N(   R    RX   RŸ   (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR¢   q  s    	c         C` s
   |  j  j S(   N(   Rž   t   ctypes(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _get_ctypesw  s    c         C` s   |  j  d k  r |  S|  j ƒ  S(   Ni   (   R�   t	   transpose(   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _get_Tz  s    s#   tuple giving the shape of the arrays   Access array in flat form.s!   Access the real part of the arrays&   Access the imaginary part of the arrayR0  s   get transposeN(m   R   R   R"   t   __array_priority__R   RS   RM   RD   R   R°   R±   R²   R´   Rµ   R·   R¹   Rº   R¼   R¾   R   R   RÉ   RÊ   RÎ   RÐ   RÒ   RÓ   RÔ   R×   RÙ   RÛ   t   __rand__t   __ror__t   __rxor__RÜ   RÞ   Rß   Rá   t   __radd__Rã   Rä   Ræ   Rè   Rê   Rë   Rí   t   __rmul__Rï   Rð   Rò   Ró   Rõ   Rö   Rù   Rû   Rü   Rý   Rþ   R  R  R  R  R  R  R
  RQ   R  R  R  R  RB   RR   R  R  R  R“   R#  R$  RV   R%  t   propertyRœ   RC   R�   RŽ   R@   R)  R:   R   R�   R*  Rš   R+  R2   RÈ   R-  R.  R/  RÇ   R¢   R1  R3  RG   t   flatR¸   R½   R»   R0  t   T(    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR1     sÖ   	A												/																													+	+	-	'									
		"						
																				c         C` s   t  |  t ƒ S(   s9   Is x a masked array, that is, an instance of MaskedArray?(   R   R1   (   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR?   •  s    gñhãˆµøä>g:Œ0âŽyE>c         C` sÍ   t  t |  ƒ t | ƒ ƒ } t |  ƒ } t | ƒ } t t | d d d | ƒ| ƒ j t ƒ } t t | d d d | ƒd ƒ j t ƒ }	 t j t j | |	 ƒ | | t j |	 ƒ ƒ }
 t	 j
 t	 j |
 ƒ ƒ S(   s¥   Returns true if all components of a and b are equal
        subject to given tolerances.
        If fill_value is 1, masked values considered equal.
        If fill_value is 0, masked values considered unequal.
        The relative error rtol should be positive and << 1.0
        The absolute error atol comes into play for those elements
        of b that are very small or zero; it says how small a must be also.
    RO   i    R�   i   (   R]   RE   RR   RP   RQ   R*   R4   Rs   R5   RT   t   alltrueRV   (   RA   Rd   RB   t   rtolt   atolRH   R   RŠ   R8   R¶   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   allcloseœ  s    	**0c         C` sÖ   t  t |  ƒ t | ƒ ƒ } | t k rg t |  ƒ } t | ƒ } t j | | ƒ } t j t j | ƒ ƒ S| rÎ t |  ƒ } t | ƒ } t j | | ƒ } t	 | d | d d ƒ} t j t j t | d ƒ ƒ ƒ Sd Sd S(   sƒ   
        True if all entries of  a and b are equal, using
        fill_value as a truth value where either or both are masked.
    R�   RO   i    i   N(
   R]   RE   RD   RR   R4   R  RT   R=  RV   RP   (   RA   Rd   RB   RH   R8   R¶   R”   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   allequal­  s    c         C` sŸ   t  j } t |  | ƒ } t | j j t j ƒ rˆ t  j | | | ƒ | | | | ƒ ƒ } t	 | d d ƒ} t
 | d | d | d | ƒSt | | d | ƒSd S(   sª  
       masked_values(data, value, rtol=1.e-5, atol=1.e-8)
       Create a masked array; mask is nomask if possible.
       If copy==0, and otherwise possible, result
       may share data values with original array.
       Let d = filled(data, value). Returns d
       masked where abs(data-value)<= atol + rtol * abs(value)
       if d is of a floating point type. Otherwise returns
       masked_object(d, value, copy)
    R    i   R�   RO   RB   N(   R4   R5   RR   t
   issubclassR2   RJ   R:   t   floatingRs   RX   RP   t   masked_object(   Rœ   Rb   R>  R?  RO   t   absR”   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_valuesÁ  s    	*c         C` sI   t  |  | ƒ } t t j | | ƒ d d ƒ} t | d | d | d | ƒS(   s5   Create array masked where exactly data equal to valueR    i   R�   RO   RB   (   RR   RX   R4   R  RP   (   Rœ   Rb   RO   R”   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRD  Ö  s    c         C` s   t  t j |  | | | ƒ ƒ S(   so   Just like range() except it returns a array whose type can be specified
    by the keyword argument dtype.
    (   RP   R:   R  (   t   startt   stopt   stepR2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  Ü  s    c         C` s   t  t j |  | ƒ ƒ S(   sA   Construct a masked array from a string. Result will have no mask.(   R}   R:   t
   fromstring(   R   R‹   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRJ  ä  s    c         C` sf   t  |  ƒ } | t k r: t j t |  ƒ | ƒ } t | ƒ St j t |  d ƒ | ƒ } t | | ƒ Sd S(   s   Left shift n bitsi    N(   RE   RD   R4   Rå   RR   R}   (   RA   RÆ   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRå   è  s    
c         C` sf   t  |  ƒ } | t k r: t j t |  ƒ | ƒ } t | ƒ St j t |  d ƒ | ƒ } t | | ƒ Sd S(   s   Right shift n bitsi    N(   RE   RD   R4   Rç   RR   R}   (   RA   RÆ   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRç   ò  s    
c         C` sh   t  |  ƒ } | t k	 r- t j | | ƒ } n  t t j t |  ƒ | ƒ d | ƒ} | j t |  ƒ ƒ | S(   sw   resize(a, new_shape) returns a new array with the specified shape.
    The original array's total size can be any size.R�   (   RE   RD   RT   R¡   RP   RR   R@   Rc   (   RA   t	   new_shapeRH   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR¡   ü  s    $c         C` sÁ   t  |  ƒ } t | t ƒ rV | d k r3 | j } n | j | } t | g | ƒ } n  t |  ƒ } | t k	 r† t	 j
 | | | ƒ } n  t	 j
 | | | ƒ } t | | ƒ } | j t |  ƒ ƒ | S(   s�   repeat elements of a repeats times along axis
       repeats is a sequence of length a.shape[axis]
       telling how many times to repeat each element.
    N(   RR   R   R,   R   Rš   RG   R   RE   RD   RT   t   repeatR}   R@   Rc   (   RA   t   repeatsR’   t   aft   numRH   R”   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt
   new_repeat  s    c         C` s   t  t j |  ƒ ƒ S(   s<   identity(n) returns the identity matrix of shape n x n.
    (   RP   R:   t   identity(   RÆ   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRQ    s    c         C` s   t  t j |  | ƒ ƒ S(   s�   indices(dimensions,dtype=None) returns an array representing a grid
    of indices with row-only, and column-only variation.
    (   RP   R:   t   indices(   t
   dimensionsR2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRR  "  s    c         C` s   t  t j |  | ƒ ƒ S(   sP   zeros(n, dtype=float) =
     an array of all zeros of the given length or shape.(   RP   R:   RY   (   RG   R2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRY   (  s    c         C` s   t  t j |  | ƒ ƒ S(   sN   ones(n, dtype=float) =
     an array of all ones of the given length or shape.(   RP   R:   R  (   RG   R2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  -  s    c         C` s   t  |  ƒ }  |  j | ƒ S(   s?   Count of the non-masked elements in a, or along a certain axis.(   R}   R  (   RA   R’   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  2  s    c   	      C` s  | d k	 r t d ƒ ‚ n  t |  ƒ } t | ƒ } t | | ƒ } t |  d ƒ } t | d ƒ } | j j t d k r� t t	 j
 | | ƒ | ƒ St t	 j | d ƒ d d ƒ} t | | ƒ } | t k rÞ t t	 j
 | | ƒ ƒ St j | d | ƒ } t t	 j
 | | ƒ | ƒ Sd S(   s   a**bs   3-argument power not supported.i   R&   i    R    N(   R   R   RE   R]   RR   R2   R3   R
   R}   R4   R÷   RX   Rl   RD   R:   R‡   (	   RA   Rd   Rø   Rˆ   R‰   RH   t   fat   fbt   md(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR÷   7  s    c         C` s   t  |  d | d d d | ƒS(   s]   masked_array(a, mask=nomask) =
       array(a, mask=mask, copy=0, fill_value=fill_value)
    R�   RO   i    RB   (   RP   (   RA   R�   RB   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR}   J  s    c         C` s4   | d  k r! t |  ƒ }  d } n  t j |  | | ƒ S(   Ni    (   R   RV   Rà   R   (   R‘   R’   R2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  P  s    	c         C` s4   | d  k r! t |  ƒ }  d } n  t j |  | | ƒ S(   Ni    (   R   RV   Rì   R   (   R‘   R’   R2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   productV  s    	c         C` sù  t  |  ƒ }  |  j } |  j } | d k r3 d } n  | d k r|| t k rÙ | d k rŠ t j |  j ƒ  j ƒ  ƒ } t d „  | d ƒ } qyt	 | d ƒ j ƒ  } t
 j j |  j ƒ  j ƒ  | ƒ } t
 j j | ƒ } ~ q;| d k r*t j |  j ƒ  ƒ } t j | d ƒ j ƒ  } t
 j j | ƒ } ~ q;t t	 | d ƒ t d | ƒj ƒ  } t j |  j ƒ  | ƒ } t j | ƒ } ~ n¿| t k rÛ| d k rÀ| | d } t
 j j |  j ƒ  | ƒ } q;t	 | d ƒ } | j }	 |	 d k ríd }	 n  |	 | k r?t j | t d d ƒ} t j |  | | ƒ } t j | | ƒ } ~ q;|	 | | f k rÌt g t | ƒ }
 t d d d ƒ |
 | <t d t t |
 ƒ ƒ d	 ƒ } t j |  | | ƒ } t j | | ƒ } ~ ~
 q;t d
 ƒ ‚ n`| d k r&t j |  | ƒ } t j | d ƒ } t
 j j | | ƒ } ~ nt	 | d ƒ } | j }	 |	 d k rSd }	 n  |	 | k r¥t | t d | d d ƒ} t j |  | | ƒ } t j | | ƒ } n“ |	 | | f k r,t g t | ƒ }
 t d d d ƒ |
 | <t d t t |
 ƒ ƒ d ƒ } t j |  | | ƒ } t j | | ƒ } n t d
 ƒ ‚ ~ | t k sS| t k rWt St | | ƒ } ~ t | t ƒ rá| j ƒ  | rát | t ƒ s¦t  | ƒ } n  | j | j k sÑt | j t ƒ | } n  | j ƒ  qán  | rñ| | f S| Sd S(   sR  average(a, axis=None, weights=None)
       Computes average along indicated axis.
       If axis is None, average over the entire array
       Inputs can be integer or floating types; result is of type float.

       If weights are given, result is sum(a*weights,axis=0)/(sum(weights,axis=0)*1.0)
       weights must have a's shape or be the 1-d with length the size
       of a in the given axis.

       If returned, return a tuple: the result and the sum of the weights
       or count of values. Results will have the same shape.

       masked values in the weights will be set to 0.0
    i   c         S` s   |  | S(   N(    (   R8   R¶   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  t  s    g      ð?g        R�   RO   i    s   w[s   ] * ones(ash, float)s   average: weights wrong shape.s(   ] * masked_array(ones(ash, float), mask)N(    (   i   (   g      ð?g        (    (   i   (   g      ð?g        (    (   i   (   R}   R�   RG   R   RD   Rà   R   R%  RV   RR   R4   RT   R  RP   R*   R:   R   RÁ   t   slicet   evalt   reprR   t
   ValueErrorR�   Rî   R   R1   RÇ   R  (   RA   R’   t   weightst   returnedR�   t   ashRÆ   R”   R  t   wsht   rRW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   new_average\  s     			"$		 			  

c         C` s²   t  t |  d ƒ d ƒ } t  | ƒ } t | ƒ } t  | ƒ } t | ƒ } t j | | | f ƒ } t j | | | f ƒ }	 t |  ƒ }
 t t |
 |	 ƒ d d d d ƒ}
 t | |
 ƒ S(   s  where(condition, x, y) is x where condition is nonzero, y otherwise.
       condition must be convertible to an integer array.
       Answer is always the shape of condition.
       The type depends on x and y. It is integer if both x and y are
       the value masked.
    i    RO   R    i   (   RR   R  RE   R:   R  RX   R]   R}   (   t	   conditionR8   R¶   t   fct   xvt   xmt   yvt   ymR”   RV  RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR‡   Ç  s    !t   raisec         C` s·   d „  } d „  } t  |  d ƒ } g  | D] } | | ƒ ^ q( } g  | D] } | | ƒ ^ qG }	 t j | |	 ƒ }
 t j | | ƒ } t t | t |  ƒ ƒ d d d d ƒ} t |
 | ƒ S(   s=   Returns array shaped like indices with elements chosen from tc         S` s   |  t  k r d St |  ƒ S(   Ni   (   R�   RR   (   R8   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   fmaskÛ  s     c         S` s0   |  t  k r d St |  ƒ } | t k r, d S| S(   Ni   i    (   R�   RE   RD   (   R8   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   nmaskÞ  s      i    RO   R    i   (   RR   R:   R  RX   R]   RE   R}   (   RR  R‹   t   outt   modeRi  Rj  R¥   R8   t   masksRA   R”   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  Ù  s    		'c         C` s@   t  |  d ƒ } t t | ƒ | ƒ } t t  | ƒ d | d | ƒS(   si   Return x as an array masked where condition is true.
       Also masked where x or condition masked.
    i   RO   R�   (   RR   R]   RE   RP   (   Rb  R8   RO   t   cmRH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_whereë  s    c         C` s   t  t |  | ƒ |  | ƒ S(   s3   masked_greater(x, value) = x masked where x > value(   Ro  Rk   (   R8   Rb   RO   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_greateró  s    c         C` s   t  t |  | ƒ |  | ƒ S(   s:   masked_greater_equal(x, value) = x masked where x >= value(   Ro  R	  (   R8   Rb   RO   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_greater_equal÷  s    c         C` s   t  t |  | ƒ |  | ƒ S(   s0   masked_less(x, value) = x masked where x < value(   Ro  Rl   (   R8   Rb   RO   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_lessû  s    c         C` s   t  t |  | ƒ |  | ƒ S(   s7   masked_less_equal(x, value) = x masked where x <= value(   Ro  Rs   (   R8   Rb   RO   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_less_equalÿ  s    c         C` sL   t  |  d ƒ } t j | | ƒ } t | t |  ƒ ƒ } t | d | d | ƒS(   s6   masked_not_equal(x, value) = x masked where x != valuei    R�   RO   (   RR   R4   R  R]   RE   RP   (   R8   Rb   RO   R”   R¥   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_not_equal  s    c         C` sL   t  |  d ƒ } t j | | ƒ } t | t |  ƒ ƒ } t | d | d | ƒS(   s{   masked_equal(x, value) = x masked where x == value
       For floating point consider masked_values(x, value) instead.
    i    R�   RO   (   RR   R4   R  R]   RE   RP   (   R8   Rb   RO   R”   R¥   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_equal
  s    c         C` s…   | | k  r! | } | } | } n  t  |  d ƒ } t j t j | | ƒ t j | | ƒ ƒ } t | t |  ƒ ƒ } t | d | d | ƒS(   sj   x with mask of all values of x that are inside [v1,v2]
       v1 and v2 can be given in either order.
    i    R�   RO   (   RR   R4   R�   Rs   R	  R]   RE   RP   (   R8   t   v1t   v2RO   R‹   R”   R¥   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_inside  s    	*c         C` s…   | | k  r! | } | } | } n  t  |  d ƒ } t j t j | | ƒ t j | | ƒ ƒ } t | t |  ƒ ƒ } t | d | d | ƒS(   sk   x with mask of all values of x that are outside [v1,v2]
       v1 and v2 can be given in either order.
    i    R�   RO   (   RR   R4   RZ   Rl   Rk   R]   RE   RP   (   R8   Rv  Rw  RO   R‹   R”   R¥   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   masked_outside   s    	*c         G` sW   t  |  ƒ } t |  ƒ j | Œ  } | t k r7 t | ƒ St | d t j | | Œ ƒSd S(   s   Copy of a with a new shape.R�   N(   RE   RR   RŽ   RD   R}   R:   (   RA   R³   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRŽ   -  s
    
c         C` sT   t  |  ƒ } t j t |  ƒ ƒ } | t k r7 t | ƒ St | d t j | ƒ ƒSd S(   s-   a as one-dimensional, may share data and maskR�   N(   RE   RT   RV   RR   RD   R}   R:   (   RA   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRV   6  s
    
c         C` s¹   g  } x! |  D] } | j  t | ƒ ƒ q Wt j | | ƒ } x. |  D] } t | ƒ t k	 rC PqC qC Wt | ƒ Sg  } x! |  D] } | j  t | ƒ ƒ qz Wt j | | ƒ } t | d | ƒS(   s+   Concatenate the arrays along the given axisR�   (   t   appendRR   R:   t   concatenateRE   RD   R}   RI   (   t   arraysR’   R”   R8   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR{  ?  s     
c         C` sx   t  |  ƒ } t |  ƒ j } | t k rC t d t j | | | ƒ ƒ St d t j | | | ƒ d t j | | | ƒ ƒ Sd  S(   NRœ   R�   (   RE   R}   Rœ   RD   R:   t   swapaxes(   RA   t   axis1t   axis2RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR}  O  s    c         C` sr   t  |  ƒ } t |  ƒ j } | t k r@ t t j | | | ƒ ƒ St t j | | | ƒ d t j | | | ƒ ƒSd S(   s"   returns selection of items from a.R�   N(   RE   R}   Rœ   RD   R:   t   take(   RA   RR  R’   Rk  Rl  RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   new_takeY  s    c         C` sf   t  |  ƒ } t |  ƒ } | t k r: t t j | | ƒ ƒ St t j | | ƒ d t j | | ƒ ƒSd S(   s!   reorder dimensions per tuple axesR�   N(   RE   RR   RD   R}   R:   R2  (   RA   t   axesRH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR2  d  s    c         C` sy   |  j  ƒ  } t | ƒ } t | ƒ } t j | | | ƒ t |  ƒ } | t k	 ru |  j ƒ  t j |  j ƒ  | d ƒ n  d S(   sn   sets storage-indexed locations to corresponding values.

    Values and indices are filled if necessary.

    i    N(   R%  RR   R:   R#  RE   RD   R¢   RC   (   RA   RR  R   Rl  R”   R"  R(  RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR#  o  s    
c         C` sl   | t  k r d St j |  j ƒ  | | ƒ t |  ƒ } | t  k rE d S|  j ƒ  t j |  j ƒ  | d ƒ d S(   s3   putmask(a, mask, values) sets a where mask is true.Ni    (   RD   R:   R$  R%  RE   R¢   RC   (   RA   R�   R   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR$  ~  s     
c         C` sv   t  |  d ƒ } t  | d ƒ } t | j ƒ d k r? d | _ n  t | j ƒ d k r` d | _ n  t t j | | ƒ ƒ S(   s÷   inner(a,b) returns the dot product of two arrays, which has
    shape a.shape[:-1] + b.shape[:-1] with elements computed by summing the
    product of the elements from the last dimensions of a and b.
    Masked elements are replace by zeros.
    i    i   (   i   (   i   (   RR   RÁ   RG   R}   R:   t   inner(   RA   Rd   RT  RU  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRƒ  ˆ  s      c         C` sÅ   t  |  d ƒ j ƒ  } t  | d ƒ j ƒ  } t j | | ƒ } t |  ƒ } t | ƒ } | t k rv | t k rv t | ƒ St |  ƒ } t | ƒ } t d t j d | d | ƒ d d ƒ} t | | ƒ S(   s3   outer(a,b) = {a[i]*b[j]}, has shape (len(a),len(b))i    i   RO   (	   RR   RV   R:   R“   RE   RD   R}   RI   RX   (   RA   Rd   RT  RU  R”   Rˆ   R‰   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR“   –  s    
*c         C` s.   t  t |  d ƒ t j t | d ƒ d d ƒ ƒ S(   sØ   dot(a,b) returns matrix-multiplication between a and b.  The product-sum
    is over the last dimension of a and the second-to-last dimension of b.
    Masked values are replaced by zeros. See also innerproduct.
    i    iÿÿÿÿiþÿÿÿ(   R  RR   R:   R}  (   RA   Rd   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  ¦  s    iÿÿÿÿc         C` sg   t  |  d ƒ } t | ƒ } | t k	 r? t j | | | ƒ } n  t j | t  | ƒ | ƒ } t | | ƒ S(   sq   Select those parts of x for which condition is true.
       Masked values in condition are considered false.
    i    (   RR   RE   RD   R:   R  R}   (   Rb  R8   t	   dimensionRk  R¥   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR  ­  s    t   _minimum_operationc           B` s8   e  Z d  Z d „  Z d d „ Z d d „ Z d „  Z RS(   s   Object to calculate minimac         C` s   d S(   s`   minimum(a, b) or minimum(a)
           In one argument case returns the scalar minimum.
        N(    (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   º  s    c         C` s’   | d k ru t | ƒ } | t k r@ t t | ƒ j ƒ  ƒ } | S| j ƒ  } t | ƒ d k rb t St | j	 ƒ  ƒ Sn t
 t | | ƒ | | ƒ Sd S(   s   Execute the call behavior.i    N(   R   RE   RD   R   RR   RV   R  RÁ   R�   R%  R‡   Rl   (   R   RA   Rd   RH   R”   t   ac(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   À  s    i    c         C` s�   t  | ƒ } | t k r= t | ƒ } t t j j | | ƒ ƒ St j j t | t | ƒ ƒ | ƒ } t j j | | ƒ } t | | t	 | ƒ ƒ Sd S(   s#   Reduce target along the given axis.N(
   RE   RD   RR   R}   R4   t   minimumR   R=   R�   Rc   (   R   R‘   R’   RH   R‹   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   Ï  s    $c         C` s‘   t  | ƒ } t  | ƒ } | t k r9 | t k r9 t } n* t | ƒ } t | ƒ } t j | | ƒ } t j j t | ƒ t | ƒ ƒ } t | | ƒ S(   s<   Return the function applied to the outer product of a and b.(	   RE   RD   RI   RZ   R“   R4   R‡  RR   R}   (   R   RA   Rd   Rˆ   R‰   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR“   Ú  s    	!N(   R   R   R"   R   R   Rm   R   R“   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR…  ¸  s
   	t   _maximum_operationc           B` s8   e  Z d  Z d „  Z d d „ Z d d „ Z d „  Z RS(   s   Object to calculate maximac         C` s   d S(   s`   maximum(a, b) or maximum(a)
           In one argument case returns the scalar maximum.
        N(    (   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR   ë  s    c         C` s’   | d k ru t | ƒ } | t k r@ t t | ƒ j ƒ  ƒ } | S| j ƒ  } t | ƒ d k rb t St | j	 ƒ  ƒ Sn t
 t | | ƒ | | ƒ Sd S(   s   Execute the call behavior.i    N(   R   RE   RD   R   RR   RV   R  RÁ   R�   R%  R‡   Rk   (   R   RA   Rd   RH   R”   R†  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRm   ñ  s    i    c         C` s�   t  | ƒ } | t k r= t | ƒ } t t j j | | ƒ ƒ St j j t | t | ƒ ƒ | ƒ } t j j | | ƒ } t | | t	 | ƒ ƒ Sd S(   s#   Reduce target along the given axis.N(
   RE   RD   RR   R}   R4   t   maximumR   R>   R�   Rc   (   R   R‘   R’   RH   R‹   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR      s    $c         C` s‘   t  | ƒ } t  | ƒ } | t k r9 | t k r9 t } n* t | ƒ } t | ƒ } t j | | ƒ } t j j t | ƒ t | ƒ ƒ } t | | ƒ S(   s<   Return the function applied to the outer product of a and b.(	   RE   RD   RI   RZ   R“   R4   R‰  RR   R}   (   R   RA   Rd   Rˆ   R‰   RH   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR“     s    	!N(   R   R   R"   R   R   Rm   R   R“   (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRˆ  é  s
   	c         C` sk   | d k r t |  ƒ } n  t |  | ƒ } t j | | ƒ } t |  ƒ t k rX t | ƒ St | | d d ƒS(   s¯  If x does not have a mask, return a masked array formed from the
       result of numeric.sort(x, axis).
       Otherwise, fill x with fill_value. Sort it.
       Set a mask where the result is equal to fill_value.
       Note that this may have unintended consequences if the data contains the
       fill value at a non-masked site.

       If fill_value is not given the default fill value for x's type will be
       used.
    RO   i    N(	   R   R9   RR   RT   t   sortRE   RD   R}   RF  (   R8   R’   RB   R”   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRŠ    s    
c         C` sf   t  j t |  ƒ | | | ƒ } t |  ƒ } | t k rC t | | ƒ St | t  j | | | | ƒ ƒ Sd S(   s9   diagonal(a,k=0,axis1=0, axis2=1) = the k'th diagonal of aN(   RT   t   diagonalRR   RE   RD   R}   (   RA   t   kR~  R  R”   RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR‹  -  s
    c         C` s   t  |  | | | ƒ j d | ƒ S(   s~   trace(a,offset=0, axis1=0, axis2=1) returns the sum along diagonals
    (defined by the last two dimenions) of the array.
    R2   (   R‹  R  (   RA   t   offsetR~  R  R2   Rk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   trace6  s    c         C` s   t  |  | ƒ } t j | | ƒ S(   sÌ   Treating masked values as if they have the value fill_value,
       return sort indices for sorting along given axis.
       if fill_value is None, use get_fill_value(x)
       Returns a numpy array.
    (   RR   RT   t   argsort(   R8   R’   Rk  RB   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR�  <  s    c         C` s   t  |  | ƒ } t j | | ƒ S(   s  Treating masked values as if they have the value fill_value,
       return indices for minimum values along given axis.
       if fill_value is None, use get_fill_value(x).
       Returns a numpy array if x has more than one dimension.
       Otherwise, returns a scalar index.
    (   RR   RT   t   argmin(   R8   R’   Rk  RB   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR�  E  s    c         C` sO   | d k r0 t |  ƒ } y | } Wq0 q0 Xn  t |  | ƒ } t j | | ƒ S(   s&  Treating masked values as if they have the value fill_value,
       return sort indices for maximum along given axis.
       if fill_value is None, use -get_fill_value(x) if it exists.
       Returns a numpy array if x has more than one dimension.
       Otherwise, returns a scalar index.
    N(   R   R9   RR   RT   t   argmax(   R8   R’   Rk  RB   R”   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR‘  O  s    c         C` s   t  t j |  | ƒ ƒ S(   s)   apply f to s to create array as in umath.(   R}   R:   t   fromfunction(   Rv   R   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR’  _  s    c         C` sD   t  |  t ƒ r. | d k s* | |  j k r. |  St |  d | d d ƒS(   s6   asarray(data, dtype) = array(data, dtype, copy=0)
    R2   RO   i    N(   R   R1   R   R2   RP   (   Rœ   R2   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR–   c  s    c         C` s   t  j |  d  t ƒ S(   N(   t   typest
   MethodTypeR   RP   (   Rv   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _mo  s    c          O` s   t  d ƒ ‚ d  S(   Ns'   not yet implemented for numpy.ma arrays(   t   NotImplementedError(   R   t   kwds(    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   not_implementedr  s    c         O` s   t  |  | ƒ S(   N(   R  (   R   R   R—  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _choose}  s    c      
   C` sU   t  d |  j j t | ƒ j t | ƒ j ƒ d t |  j t t | ƒ t | ƒ ƒ ƒ ƒ S(   NRœ   R�   (   R1   Rœ   t   clipR–   R]   R�   RE   (   R   t   a_mint   a_maxRk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _clip‚  s    	c         C` s   t  | |  | ƒ S(   N(   R  (   R   t   condR’   Rk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _compress‰  s    c         C` sX   |  j  } | t k	 r0 t j j |  j  | ƒ } n  t d |  j d ƒ j | | ƒ d | ƒ S(   NRœ   i   R�   (   R�   RD   R4   RZ   R•   R1   RR   t   cumprod(   R   R’   R2   Rk  RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _cumprod‘  s    	c         C` sX   |  j  } | t k	 r0 t j j |  j  | ƒ } n  t d |  j d ƒ j | | ƒ d | ƒ S(   NRœ   i    R�   (   R�   RD   R4   RZ   R•   R1   RR   t   cumsum(   R   R’   R2   Rk  RH   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _cumsum˜  s    	c         C` sE   | d  k	 r t d ƒ ‚ n  | d  k r1 t |  ƒ St j |  | ƒ Sd  S(   Ns+   Output arrays Unsupported for masked arrays(   R   R<   R‰  R   (   RA   R’   Rk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _max§  s
    
c         C` sE   | d  k	 r t d ƒ ‚ n  | d  k r1 t |  ƒ St j |  | ƒ Sd  S(   Ns+   Output arrays Unsupported for masked arrays(   R   R<   R‡  R   (   RA   R’   Rk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _min°  s
    
c         C` s   |  j  | | ƒ |  j | ƒ S(   N(   t   maxt   min(   RA   R’   Rk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _ptp¿  s    c         C` sR   y+ t  d |  j j ƒ  d |  j j ƒ  ƒ } Wn  t k
 rM t |  d ƒ } n X| S(   NRœ   R�   t   squeeze(   R1   Rœ   R©  R�   RL   t   _wrapit(   R   RW   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _squeezeÉ  s    c         C` s1   t  d |  j j | | ƒ d |  j j | | ƒ ƒ S(   NRœ   R�   (   R1   Rœ   R}  R�   (   R   R~  R  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt	   _swapaxesÔ  s    c         C` s†   | d  k r% t j |  j ƒ  ƒ j ƒ  S|  j | d ƒ } | | j d d ƒ } | | 9} | | j d d ƒ } | j d | ƒ j | ƒ S(   Ni    R’   (	   R   R:   R–   R  t   varR}  t   meanR  R  (   R   R’   R2   Rk  RA   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _varÝ  s    
c         C` s   |  j  | | ƒ d S(   Ng      à?(   R­  (   R   R’   R2   Rk  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   _stdå  s    R�   c         C` s   t  |  | | ƒ S(   N(   RP  (   RA   RM  R’   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyRL  ñ  s    c         C` s   t  |  | | | ƒ S(   N(   Ra  (   RA   R’   R\  R]  (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   averageô  s    c         C` s   t  |  | | ƒ S(   N(   R�  (   RA   RR  R’   (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyR€  ÷  s    (ï   R"   t
   __future__R    R   R   t   sysR“  R©   t	   functoolsR   t   numpy.core.umatht   coreR4   t   numpy.core.fromnumericRT   t   numpy.core.numericR:   R   R   R   R   R   t   numpy.core.numerictypesR	   R
   t   numpy.compatR   R   t   version_infot   maxsizeR;   t   _MININTt   maxintRz   R{   RK   RD   R‚   t	   ExceptionR   R   R¿   R+   R0   R.   R-   R6   R9   R=   R>   R@   RE   RI   RN   RX   RF   R]   R   RR   Rc   Rg   Rh   Rn   Rq   Rt   Ru   R€   Rƒ   RŒ   Rú   t   logt   log10t   expt	   conjugatet   sinRp   t   tant   arcsint   arccost   arctant   arcsinht   arccosht   arctanht   sinht   cosht   tanhR5   t   fabsRÝ   R—   t   round_t   aroundt   floort   ceilt   logical_notRà   Ré   Rì   Rî   Rñ   Rô   Râ   t   fmodt   hypott   arctan2R  R  Rs   R	  Rl   Rk   R�   R=  RZ   RU   t   logical_xorRÕ   RØ   RÚ   R˜   RG   Rš   R™   R1   RP   R?   t   isarrayt   isMAR@  RA  RF  RD  R  t
   arrayrangeRJ  Rå   Rç   R¡   RP  RQ  RR  R*   RY   R  R  R÷   R}   R  RW  Ra  R‡   R  Ro  Rp  Rq  Rr  Rs  Rt  Ru  Rx  Ry  RŽ   RV   R{  R}  R�  R2  R#  R$  Rƒ  R  R“   R  R  R  R…  R‡  Rˆ  R‰  RŠ  R‹  RŽ  R�  R�  R‘  R’  R–   R•  R˜  t   allR¨   R:  t   baset   byteswapR™  R�  Rš  RŸ  t   conjRO   R¡  R   R£  R¢  t   dumpt   dumpsRw   R`   t   flattent   getfieldR¤  R¦  R¥  R§  R®  t   nbytest   newbyteordert   prodR¨  t   ptpRL  t   searchsortedt   setfieldt   setflagsR«  R©  t   stridesR¬  R€  t   tofileR¯  R°  R­  t   stdt   viewt   roundR,   R�   R±  (    (    (    sM   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/ma.pyt   <module>   sð  		
													


#E&												ÿ ÿ ÿ ‰			
	
	
	k							
	
			/	/			
						