;ņ
r?c           @   sk   d  k  Te Z e Z e Z e Z e	 Z
 d   Z d d  Z d   Z d d d  Z d d d  Z	 e Z d S(	   (   s   *c         C   sN   t  |   } t |  d j o | Sn$ t |  d j o | d Sn | Sd S(   sĪ  nonzero() returns either an index array or a tuple of index
    arrays corresponding to the indices where the values of an array
    are not equal to zero.

    This is the Numeric compatible version of nonzero() supplied by
    numarray.numeric.  It differs from numarray.nonzero() in the
    handling of 1D arrays.  numarray.nonzero() always returns a tuple;
    Numeric.nonzero() returns a tuple when the number of dimensions of
    the array is not one.
    i   i    N(   s   numarray_nonzeros   as   nzs   len(   s   as   nz(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/numeric.pys   nonzero	   s    
 i    c         C   sL   t  |  t  p |  i   o t |   }  n t |  | d | d t Sd  S(   Ns   axiss   clipmode(	   s
   isinstances   as   NumArrays   iscontiguouss   arrays   numarray_takes   indicess   axiss   WRAP(   s   as   indicess   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/numeric.pys   take   s    c         C   s   t  |  i | |  d S(   sæ  put(a, ind, v) results in a[n] = v[n] for all n in ind
    If v is shorter than mask it will be repeated as necessary.
    In particular v can be a scalar or length 1 array.
    The routine put is the equivalent of the following (although the loop 
    is in C for speed):     
    ind = array(indices, copy=0) 
    v = array(values, copy=0).astype(a, typecode()) 
    for i in ind: a.flat[i] = v[i] 
    a must be a contiguous Numeric array.
    N(   s   numarray_puts   as   flats   inds   v(   s   as   inds   v(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/numeric.pys   put!   s    
 s   lc         C   s   t  |  |  Sd  S(   N(   s   numarray_oness   shapes   typecode(   s   shapes   typecodes	   savespace(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/numeric.pys   ones.   s    c         C   s   t  |  |  Sd  S(   N(   s   numarray_zeross   shapes   typecode(   s   shapes   typecodes	   savespace(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/numeric.pys   zeros1   s    N(   s   numarrayalls   nonzeros   numarray_nonzeros   puts   numarray_puts   takes   numarray_takes   oness   numarray_oness   zeross   numarray_zeross   NumArrays	   arraytype(   s   nonzeros   numarray_oness   numarray_nonzeros   numarray_zeross   numarray_puts	   arraytypes   numarray_takes   oness   zeross   takes   put(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/numeric.pys   ?   s   		