;ò
U‹P@c           @   ss  d  Z  d k Z d k Z d k Z d k Z d k Z d k	 Z	 d k
 Z
 d k Z d k Z d k Z d k l Z d k l Z d k l Z d k l Z d k Z d Z d „  Z e i e
 i e e
 i ƒ e Z d d	 Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d e# _$ d e f d „  ƒ  YZ% d „  Z& d „  Z' d „  Z( d „  Z) e d „ Z* d d „ Z+ d d „ Z, d d „ Z- d d „ Z. d  „  Z/ e e e d! „ Z0 d" „  Z1 d# „  Z2 d d$ „ Z3 d k4 Z5 d k6 Z6 d% k6 l7 Z7 l8 Z8 l9 Z9 l: Z: l; Z; d k< Z< d& „  Z= d d' „ Z> d( „  Z? d d) „ Z@ e d* „ ZA d+ „  ZB d, „  ZC d- „  ZD d S(.   sø   ndarray: Base multidimensional array class

This is the base multidimensional array class which implements all
structural array operations but treats the array contents as opaque
objects

$Id: generic.py,v 1.43 2004/02/26 19:29:28 jaytmiller Exp $
N(   s   _ndarray(   s   _isIntegerSequence(   s   product(   s
   _alignmenti    c         C   s   t  i t |  ƒ f f Sd S(   s9   Converts a "buffer" object to a pickling reduction tuple.N(   s   memorys   memory_from_strings   strs   b(   s   b(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _buffer_reduce   s     i   i   c         C   s)   d } x |  D] } | | 9} q W| Sd  S(   Ni   (   s   ns   shapes   s(   s   shapes   ss   n(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _product+   s
     c         G   s©   yƒ |  f  j o | o f  Sn t |  ƒ t i t i g j o |  f | }  n | o
 t ‚ n t |  ƒ }  t |  ƒ o |  Sn Wn t j
 o n Xt d ƒ ‚ d S(   sÐ   Verifies that this is a legal shape specification and returns tuple

    Shape can be an integer or a sequence of integers.  Also can pass
    several integer arguments.  Raises an exception on problems.
    s"   Shape must be sequence of integersN(	   s   shapes   argss   types   _typess   IntTypes   LongTypes	   TypeErrors   tuples   _isIntegerSequence(   s   shapes   args(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   getShape1   s     
c         C   s6  |  i } | | j o |  Sn t | ƒ } t | ƒ } | | j o t Sn | | j o t |  i	 ƒ } n4 d g | | t |  i	 ƒ } | d | | !| } | | j o_ x\ t | ƒ D]J } | | | | j o/ | | d j o d | | <qt d ƒ ‚ q¸ q¸ Wn |  i ƒ  } | | _ t | ƒ | _	 | Sd S(   s/   Return broadcast view of arr, else return None.i    i   s   Arrays have incompatible shapesN(   s   arrs   _shapes   ashapes   sshapes   lens   sranks   aranks   Nones   lists   _stridess   astridess   ranges   is
   ValueErrors   views   tarrs   tuple(   s   arrs   sshapes   sranks   aranks   ashapes   astridess   is   tarr(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys
   _broadcastG   s.     	 	c         C   sV   xK t  t |  ƒ d ƒ D]3 } |  | i |  | d ƒ \ |  | <|  | d <q W|  Sd  S(   Ni   (   s   ranges   lens   indexArrayss   is   _dualbroadcast(   s   indexArrayss   i(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _forwardBroadcastb   s     1c         C   sK   t  |  ƒ d j o0 t |  ƒ }  |  i ƒ  t |  ƒ }  |  i ƒ  n |  Sd  S(   Ni   (   s   lens   indexArrayss   _forwardBroadcasts   reverse(   s   indexArrays(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _nWayBroadcasth   s    
c   	      C   s  t  | ƒ } t  |  i ƒ } | | j o t d ƒ ‚ n x7 t t  | ƒ ƒ D]# } t	 i
 | | t i ƒ | | <qK Wt | ƒ } | | } | | j  oN |  i | d } |  i | } |  i ƒ  p |  i ƒ  o t d ƒ ‚ qò n |  i } f  } | d i | } | | f Sd S(   s8   computes the shape of the result of a take/put operations   Specified too many indices...i   sY   Invalid destination array: partial indices require contiguous non-byteswapped destinationi    N(   s   lens   indexArrayss   nindexArrayss	   scattereds   _shapes   arrDimss
   ValueErrors   ranges   is   _ncs   asarrays   _nts	   MaybeLongs   _nWayBroadcasts   leftOvers   _stridess   Ns   nShapes   isbyteswappeds   iscontiguouss	   _itemsizes   impliedShape(	   s	   scattereds   indexArrayss   leftOvers   nShapes   impliedShapes   nindexArrayss   Ns   is   arrDims(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys
   _takeShapeq   s&      !
	c         C   s   |  i ƒ  d  S(   N(   s   arrs   info(   s   arr(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   info�   s    c         C   so   t  |  ƒ t i j pU t  |  ƒ t i j p? t  |  ƒ t i j o) d t |  i ƒ j o d t |  i ƒ j Sd S(   sp   SuitableBuffer(b) determines whether 'b' can be used as an NDArray
    buffer.

    This check is obsolete.
    s
   __buffer__s   resizeN(	   s   types   bs   _typess
   BufferTypes   memorys
   MemoryTypes   InstanceTypes   dirs	   __class__(   s   b(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   SuitableBuffer’   s     c         C   s$   |  i |  ƒ } | i | ƒ | Sd  S(   N(   s   clss   __new__s   selfs   __setstate__s   state(   s   clss   states   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   ClassicUnpicklerž   s    i   s   NDArrayc           B   s5  t  Z d  Z e o… f  d e d e e i d d „ Z d „  Z e d „ Z	 d „  Z
 d „  Z d „  Z e d	 „ Z d
 „  Z d „  Z d „  Z d „  Z n 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$ e# e" d  d! ƒZ% d" „  Z& d# „  Z' d$ „  Z( e$ e' e( d  d% ƒZ) d& „  Z* d' „  Z+ d( „  Z, d) „  Z- e d* „ Z. d+ „  Z/ d, „  Z/ d- „  Z0 d. „  Z1 d/ „  Z2 d0 „  Z3 d1 „  Z4 d2 „  Z5 d3 „  Z6 d d4 „ Z7 d5 „  Z8 d6 „  Z9 e d7 „ Z: d8 „  Z; RS(9   sI  Multi-dimensional array abstract base class

    This class defines the structural operations common to numarray.
    Subclasses must provide the semantical interpretation of elements,
    including the __str__, __repr__, _getitem, and _setitem methods.

    Given an array index of arr[k,j,i] it is always true that the
    byte offset of the element in the array is computed thusly:

    with shape[0] --> dimension of current view
         strides[0] --> bytestride for k index dimension

    element_byte_offset = byteoffset +
               ( i*strides[2] + j*strides[1] + k*strides[0])

    where 0 <= i < shape[2],
          0 <= j < shape[1],
          0 <= k < shape[0]

    For contiguous numarray strides[i] = shape[i+1]*strides[i+1]

    Summary of attribute meanings:

    _data           buffer with data for the array
    _shape          dimensions of the array
    _byteoffset     The byte offset of the first element from the beginning
                    of the buffer
    _bytestride     The separation between items in bytes.
    _itemsize       The size of items in bytes
    i   i    c   	      C   sº   t  i |  ƒ | |  _ | |  _ t | ƒ |  _	 | t j o | |  _ n' | | j  o t d ƒ ‚ n
 | |  _ | o | |  _ n& |  i |  i ƒ  } t i | ƒ |  _ |  i ƒ  |  _ d  S(   Ns   bytestride must be >= itemsize(   s   _ndarrays   __init__s   selfs   itemsizes	   _itemsizes
   byteoffsets   _byteoffsets   getShapes   shapes   _shapes
   bytestrides   Nones   _bytestrides
   ValueErrors   buffers   _datas	   nelementss   sizes   memorys
   new_memorys   _stridesFromShapes   _strides(	   s   selfs   shapes   itemsizes   buffers
   byteoffsets
   bytestrides	   byteorders   aligneds   size(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __init__Å   s    			c         C   s5   t  |  i ƒ o t |  i d ƒ Sn t d ƒ ‚ d  S(   Ni    s   Rank-0 array has no length.(   s   lens   selfs   _shapes   ints
   ValueError(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __len__Û   s    c         C   sü  t  | t ƒ o t |  i ƒ d j o¢ | d j  o | |  i d 7} n d | j o |  i d j  n o t d ƒ ‚ n |  i d | |  i } | t j o |  i | ƒ SqÈ |  i | | ƒ Sn t  | t t f ƒ o |  i | ƒ } n | } t  | t i t i t t t i f ƒ o | f } nK t  | t ƒ o4 t  | d t i ƒ o t | ƒ } qv| f } n | } t  | t ƒ o t d ƒ ‚ n t | ƒ } t | ƒ o |  i | | ƒ Sn5 |  i | ƒ o |  i | | ƒ Sn |  i | | ƒ Sd S(   s@   Handles both getting (value == None) and setting (value != None)i   i    s   Index out of ranges   Illegal indexN(   s
   isinstances   keys   ints   lens   selfs   _shapes
   IndexErrors   _stridess   _byteoffsets   offsets   values   Nones   _getitems   _setitems   lists   tuples   factorys   fvalues   _typess	   SliceTypes   EllipsisTypes   longs   _ncs   NumArrays   tkeys   tkey2s   _isIntegerSequences   _simpleIndexings   _isSlices   _slicedIndexings   _arrayIndexing(   s   selfs   keys   values   offsets   tkey2s   tkeys   fvalue(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _universalIndexingá   s8     & &(c         C   sð   t  | ƒ t  |  i ƒ j o t d ƒ ‚ n |  i | ƒ } t  | ƒ t  |  i ƒ j o2 | t j o |  i	 | ƒ Sqì |  i
 | | ƒ nd |  i ƒ  } |  i t  | ƒ | _ |  i t  | ƒ | _ | | _ | t j o | Sn | i | ƒ d  S(   Ns   Too many indices(   s   lens   keys   selfs   _shapes
   IndexErrors   _getByteOffsets   offsets   values   Nones   _getitems   _setitems   views   retarrs   _stridess   _byteoffsets	   _copyFrom(   s   selfs   keys   values   retarrs   offset(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _simpleIndexing
  s    	c         C   s  | i | i | i f \ } } } | t j o
 d } n | d j o t d ƒ ‚ n | d j oÄ | t j o
 d } nJ | | j o
 | } n3 | d j  o% | | 7} | d j  o
 d } qÂ n | t j o
 | } qò| | j o
 | } qò| d j  o% | | 7} | d j  o
 d } q"qònÍ | t j o | d } nN | | j o | d } n3 | d j  o% | | 7} | d j  o
 d } qŽn | t j o
 d } nN | | j o | d } n3 | d j  o% | | 7} | d j  o
 d } qòn t | ƒ t | ƒ t | ƒ f Sd  S(   Ni   i    s   slice step of zero not allowediÿÿÿÿ(   s   slices   starts   stops   steps   Nones
   IndexErrors   shapes   int(   s   selfs   slices   shapes   stops   starts   step(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys	   _fixSlice  sN    !









c   
      C   s"  t  | ƒ oH | t j o |  Sq|  i f  j o | |  f  <t Sq|  i | ƒ SnÉ| d | d f \ } }	 t	 | t
 ƒ o´ | d j  o | |  i | 7} n d | j o |  i | j  n o t d ƒ ‚ n |  i | |  i | 7_ |  i |  |  i | d |  _ |  i |  |  i | d |  _ nØ |  i | |  i | ƒ \ } } } t
 t i t | | ƒ | ƒ ƒ } | d j  o
 d } n |  i |  i | | 7_ |  i |  | f |  i | d |  _ |  i |  |  i | | f |  i | d |  _ | d 7} |  i |	 | | ƒ Sd  S(   Ni    i   s   Index out of range(   s   lens   keys   values   Nones   selfs   shapes	   _copyFroms   slices   rests
   isinstances   ints   _shapes   dims
   IndexErrors   _byteoffsets   _stridess	   _fixSlices   starts   stops   steps   _maths   ceils   floats   strideds   _slicedIndexing0(
   s   selfs   keys   values   dims   slices   strideds   stops   starts   steps   rest(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _slicedIndexing0M  s2    
&#"#
&1
c   
      C   s  |  i ƒ  } d } xä t t | ƒ ƒ D]Ð } t | | t	 t
 f ƒ p t | | t i ƒ o | d 7} q% t | | t i ƒ ot d } x1 | | d D]! }	 |	 t j	 o | d 7} q– q– Wt t t t ƒ g t |  i ƒ | | | | | d +Pq% q% WxN t | t | ƒ ƒ D]7 } t | | t i ƒ o t t t t ƒ | | <qqWx± t t | ƒ ƒ D]� } | | t j o† t d d d ƒ | | <| d j o | d } n d } | i |  | i | f | i | | _ | i |  d f | i | | _ q]q]W| i | | d ƒ Sd  S(   Ni    i   (   s   selfs   views   results   indexeds   ranges   lens   keys   is
   isinstances   ints   longs   _typess	   SliceTypes   EllipsisTypes   non_news   ks   NewAxiss   slices   Nones   _shapes   js   whichs   _stridess   _slicedIndexing0s   value(
   s   selfs   keys   values   non_news   is   js   results   whichs   indexeds   k(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _slicedIndexingt  s8     1 5	  )*c         C   sh   x] t  t | d ƒ ƒ D]E } t g  i } | D] } | | | ƒ q. ~ ƒ } |  | | | <q W| Sd  S(   Ni    (   s   xranges   lens   indicess   is   tuples   appends   _[1]s   inds   indexs   selfs   result(   s   selfs   indicess   results   indexs   is   _[1]s   ind(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _taker–  s
     1c         C   sd   x] t  t | d ƒ ƒ D]E } t g  i } | D] } | | | ƒ q. ~ ƒ } | | |  | <q Wd  S(   Ni    (   s   xranges   lens   indicess   is   tuples   appends   _[1]s   inds   indexs   valuess   self(   s   selfs   indicess   valuess   indexs   is   _[1]s   ind(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _putterœ  s     1c         C   s„   |  i i |  i ƒ } | i i |  i ƒ |  i | _ |  i | _ |  i | _ |  i	 | _	 |  i
 | _
 |  i | _ |  i | _ | Sd S(   sE   Return a new array object, with the same reference to the data bufferN(   s   selfs	   __class__s   __new__s   arrs   __dict__s   updates   _datas   _shapes   _byteoffsets   _bytestrides	   _itemsizes   _stridess   _aligned(   s   selfs   arr(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _view¡  s     c         C   sd  t  |  i ƒ } | d j  o | | 7} n | d j  o | | 7} n | d j p
 | | j o d Sn | t | ƒ j p | t | ƒ j o t d ƒ ‚ n | | j o | | f \ } } n |  i d | !|  i | f |  i | d | !|  i | f |  i | d |  _ |  i d | !|  i | f |  i | d | !|  i | f |  i | d |  _ d S(   s5   swapaxes() interchanges axis1 and axis2.
            i    i   Ns"   Specified dimension does not exist(	   s   lens   selfs   _shapes   ns   axis1s   axis2s   ranges
   ValueErrors   _strides(   s   selfs   axis1s   axis2s   n(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   swapaxes¯  s       &Pc         C   su   t  i  |  i ƒ } t i | d <|  i | d <|  i | d <|  i | d <|  i	 | d <|  i
 | d <|  i | d <| Sd S(	   s&   returns state of NDArray for pickling.s   _versions   _bytestrides   _byteoffsets   _shapes   _stridess   _datas	   _itemsizeN(   s   copys   selfs   __dict__s   states
   numincludes   versions   _bytestrides   _byteoffsets   _shapes   _stridess   _datas	   _itemsize(   s   selfs   state(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __getstate__Ã  s     c         C   sb   |  i i | ƒ | d |  _ | d |  _ | d |  _ | d |  _ | d |  _ | d |  _	 d S(   s+   restores state of NDArray after unpickling.s   _bytestrides   _byteoffsets   _shapes   _stridess   _datas	   _itemsizeN(
   s   selfs   __dict__s   updates   states   _bytestrides   _byteoffsets   _shapes   _stridess   _datas	   _itemsize(   s   selfs   state(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __setstate__Ï  s     c         C   s   t  d ƒ ‚ d  S(   NsM   An array doesn't make sense as a truth value.  Use sometrue(a) or alltrue(a).(   s   RuntimeError(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __nonzero__Ù  s    c         C   s   |  i ƒ  Sd S(   s   support for copy.copy()N(   s   selfs   copy(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __copy__Ü  s     c         C   s   |  i ƒ  Sd S(   s   support for copy.deepcopy()N(   s   selfs   copy(   s   selfs   memo(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __deepcopy__à  s     c         C   s!   t  |  i f |  i ƒ  f f Sd S(   s’   __reduce__ returns the pickling "reduction tuple" for an NDArray.
        Used for NDArray derived from C basetypes, not classic classes.
        N(   s   ClassicUnpicklers   selfs	   __class__s   __getstate__(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys
   __reduce__ä  s     c         C   s9   |  i i } | d t i |  d d d | d ƒd Sd  S(   Ns   (s	   separators   , s   prefixs   )(   s   selfs	   __class__s   __name__s   names
   arrayprints   array2string(   s   selfs   name(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __repr__ê  s    c         C   s   t  i |  d d ƒSd  S(   Ns	   separators   , (   s
   arrayprints   array2strings   self(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   __str__ï  s    c         C   s   |  i Sd S(   s#   Size (in bytes) of an array elementN(   s   selfs	   _itemsize(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   itemsizeò  s     c         C   s   |  i ƒ  o
 |  i ƒ  Sd S(   s`   is_c_array() returns 1 iff the array is aligned and contiguous,
        and returns 0 otherwise.N(   s   selfs	   isaligneds   iscontiguous(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys
   is_c_arrayö  s     c         C   s~   t  |  i ƒ } | o` |  i g | } x? t | d d d ƒ D]' } | | d |  i | d | | <q= Wt | ƒ Sn f  Sd S(   s5   Compute the strides from shape for a contiguous arrayi   iÿÿÿÿi   N(	   s   lens   selfs   _shapes   ndims   _bytestrides   stridess   xranges   is   tuple(   s   selfs   ndims   is   strides(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _stridesFromShapeû  s      %c         C   s  x: | D]2 } t | t i t i f ƒ o t d ƒ ‚ q q Wt | d t i ƒ o | d i	 ƒ  t
 i j } | o t | ƒ d j o t d ƒ ‚ n | t j o6 | o |  i t i | d ƒ ƒ Sq|  i | ƒ Sn9 | o! |  i t i | d ƒ | ƒ n |  i | | ƒ d  S(   Ns)   Cannot mix numarray and slices as indicesi    i   s,   Invalid boolean key; specify one array only.(   s   keys   items
   isinstances   _typess	   SliceTypes   EllipsisTypes
   IndexErrors   _ncs   NumArrays   types   _nts   Bools   bools   lens
   ValueErrors   values   Nones   selfs   _takes   ufuncs   nonzeros   _put(   s   selfs   keys   values   items   bool(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _arrayIndexing  s     0!c         C   ss   xh | D]` } t | t i t f ƒ o d Sn t | t t t i	 t i
 t i f ƒ o t d ƒ ‚ q q Wd Sd  S(   Ni    s   index is not of legal formi   (   s   keys   items
   isinstances   _ncs   NumArrays   lists   ints   longs   _typess   NoneTypes	   SliceTypes   EllipsisTypes
   IndexError(   s   selfs   keys   item(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _isSlice  s     )c         C   s   t  | |  i ƒ Sd S(   s/   Return broadcast view of arr, else return None.N(   s
   _broadcasts   arrs   selfs   _shape(   s   selfs   arr(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys
   _broadcast$  s     c         C   s  |  i } | i } | | j o |  | f Sn t | ƒ } t | ƒ } | | j oI | } t	 |  i
 ƒ } | | |  | } d g | | t	 | i
 ƒ } nF | } t	 | i
 ƒ } | | |  | } d g | | t	 |  i
 ƒ } t	 | ƒ } x“ t | ƒ D]… } | | | | j oj | | d j o | | | | <d | | <q~| | d j o | | | | <d | | <q~t d ƒ ‚ qù qù Wt | ƒ } |  | f \ }	 }
 |  i | j o( |  i ƒ  }	 | |	 _ t | ƒ |	 _
 n | i | j o( | i ƒ  }
 | |
 _ t | ƒ |
 _
 n |	 |
 f Sd S(   sB   Return broadcast views both self and arr, else return (None,None).i    i   s   Arrays have incompatible shapesN(   s   selfs   _shapes   sshapes   arrs   ashapes   lens   sranks   aranks   newranks   lists   _stridess   sstridess   astridess   newshapes   ranges   is
   ValueErrors   tuples   tselfs   tarrs   view(   s   selfs   arrs   newshapes   sranks   aranks   sshapes   ashapes   astridess   is   tselfs   tarrs   sstridess   newrank(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _dualbroadcast(  sL     		" 		c      	   C   sÖ   |  i d f f  | i g j p | i d f f  |  i g j o t d ƒ ‚ n | i |  i j o t d ƒ ‚ n t i d } | i f  j o f  p |  i } | | | i	 | i
 | i |  i	 |  i
 |  i |  i ƒ d S(   s�   Copy elements from another array.

        This is the generic version. Subclasses (such as numarray)
        may override this method
        i   s   Arrays have inconsistent sizess"   Arrays must have the same itemsizes
   copyNbytesN(   s   selfs   _shapes   arrs
   ValueErrors	   _itemsizes   _bytess   functionDicts   cfuncs   sShapes   _datas   _byteoffsets   _strides(   s   selfs   arrs   sShapes   cfunc(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys	   _copyFromS  s     > c         G   sð   |  i ƒ  o t d ƒ ‚ n t t | | Œ ƒ } |  i ƒ  } | i d ƒ } | d j o t
 d ƒ ‚ n; | d j o- t t | ƒ ƒ } | | | | i d ƒ <n t | ƒ } | | j o" t | ƒ |  _ |  i ƒ  |  _ n t
 d ƒ ‚ d S(   sK   Change array shape in place.  Call as setshape(i,j,k) or setshape((i,j,k)).s%   Can't reshape non-contiguous numarrayiÿÿÿÿi   s,   no more than one dimension can have value -1s.   New shape is not consistent with the old shapeN(   s   selfs   iscontiguouss	   TypeErrors   lists   getShapes   shapes   argss	   nelementss   counts   negcounts
   ValueErrors   abss   products
   tnelementss   indexs   newnelementss   tuples   _shapes   _stridesFromShapes   _strides(   s   selfs   shapes   argss   newnelementss
   tnelementss	   nelementss   negcount(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   setshapee  s      c         C   s   |  i Sd  S(   N(   s   selfs   _shape(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   getshapez  s    s   docs   tuple of array dimensionsc         C   s   |  i Sd  S(   N(   s   selfs   rank(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   getrank  s    c         C   s;   |  i ƒ  o |  i ƒ  } n |  i ƒ  } | i ƒ  | Sd  S(   N(   s   selfs   iscontiguouss   views   as   copys   ravel(   s   selfs   a(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   getflat�  s
    
c         C   s!   |  i ƒ  } | i ƒ  | | (d  S(   N(   s   selfs   views   as   ravels   flat(   s   selfs   flats   a(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   setflat‰  s    
s   access to array as 1Dc      	   C   s#  |  i ƒ  } t i | i | i ƒ  ƒ | _ d | _ | i | _	 | i
 ƒ  | _ |  i | _ t |  i ƒ o| d t |  i ƒ d } |  i ƒ  o t i i | ƒ p t i d } | | i |  i |  i |  i | i d | i | i ƒ n t | d ƒ o
 | ` n t | d ƒ o
 | ` n | Sd S(   sG   Return a new array with the same shape and type, but a copy of the datai    s   copys   bytess
   copyNbytess   _aligneds   _contiguousN(   s   selfs   views   arrs   memorys
   new_memorys	   _itemsizes	   nelementss   _datas   _byteoffsets   _bytestrides   _stridesFromShapes   _stridess   products   _shapes   strs   fnames	   isaligneds   _bytess   functionDicts   gets   copyfunctions   hasattrs   _aligneds   _contiguous(   s   selfs   fnames   copyfunctions   arr(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   copy�  s$     	-

c         C   s,   t  i |  i |  i |  i |  i |  i ƒ Sd S(   s   Return a string with a binary copy of the array

        Copies are always contiguous, but no conversions are implied

        N(   s   _bytess   copyToStrings   selfs   _shapes   _datas   _byteoffsets   _stridess	   _itemsize(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   tostringª  s     c         C   së   d } t | ƒ t d ƒ j o d } t | d ƒ } n t |  i } | d j oJ t i	 |  i
 | ƒ \ } } |  i | g  | | ƒ | o | i ƒ  qç nL |  i ƒ  } d | _ |  i
 |  i f | _
 |  i d f | _ | i | ƒ d S(   s·  Write the array as a binary image to a file.

        If file is a string, it attempts to open a file with that name,
        otherwise it assumes file is a file object. At the moment if
        special positioning is needed in the file one must do that with
        the file object beforehand. More options may be added to this
        method to allow positioning or appends.

        Note that for numerical data, the system byte order in which
        the data is represented is *not* recorded in the file.  This
        renders the file non-portable because extra information is
        required to interpret it on different machines than the one it
        was created on.
        
        i    s    i   s   wbN(   s   names   types   files   opens   _IOBLOCKSIZEs   selfs	   _itemsizes   niters   _ufuncs   _getBlockingParameterss   _shapes
   indexlevels   blockingparameterss   _tofileByBlockss   closes   views   vs   _stridess   tofile(   s   selfs   files   niters   names
   indexlevels   vs   blockingparameters(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   tofile³  s      	c         C   s  t  | ƒ } | | j oµ | \ } } } } d }
 | } xÔ t | | ƒ D]} } | | j o
 | } n | |
 g } t i | |  i |  i | ƒ |  i t  | ƒ |  i ƒ }	 | i |	 ƒ |
 | d 7}
 qI WnB x> t |  i | ƒ D]) } | | g } |  i | | | | ƒ qâ Wd S(   ss   Write the array to a file repeatedly in blocks

        This is done similarly to ufunc._doOverDimensions

        i    N(   s   lens   dimss   levels
   indexlevels   blockingparameterss   nregShapeIterss   shapes   leftovers   leftoverShapes   currentIndexs   tshapes   xranges   is   tdimss   _bytess   copyToStrings   selfs   _datas   _getByteOffsets   _stridess	   _itemsizes   ss   files   writes   _shapes   _tofileByBlocks(   s   selfs   files   dimss
   indexlevels   blockingparameterss   levels   is   tshapes   shapes   ss   currentIndexs   leftoverShapes   leftovers   nregShapeIterss   tdims(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _tofileByBlocksÕ  s(      
 c         C   s   t  |  i ƒ } | t j o t | ƒ } | i ƒ  n t  | ƒ | j o t d ƒ ‚ n t	 | ƒ } | i ƒ  | t | ƒ j o t d ƒ ‚ n g  g  f \ } } x6 | D]. } | i |  i | ƒ | i |  i | ƒ q¬ Wt | ƒ |  _ t | ƒ |  _ d S(   s¼   transpose() re-shapes the array by permuting it's
        dimensions as specified by 'axes'.  If 'axes' is none, transpose
        returns the array with it's dimensions reversed.
        s    Wrong number of axes in tranposes#   Duplicate or missing transpose axesN(   s   lens   selfs   _shapes   slens   axess   Nones   ranges   reverses
   ValueErrors   lists   taxs   sorts   nshapes   nstridess   is   appends   _stridess   tuple(   s   selfs   axess   slens   nstridess   is   taxs   nshape(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys	   transposeï  s$     
 c         C   sT   |  i ƒ  } | | _ t | ƒ | _ d | _ t i	 t
 | ƒ |  i ƒ | _ | Sd S(   sE   returns an empty array identical to 'self' but with 'shape'.
        i    N(   s   selfs   views   cs   shapes   _shapes   _stridesFromShapes   _stridess   _byteoffsets   memorys
   new_memorys   products	   _itemsizes   _data(   s   selfs   shapes   c(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _clone  s     		c         C   s!   |  i ƒ  } | i | ƒ | Sd  S(   N(   s   selfs   copys   cs   resizes   shape(   s   selfs   shapes   c(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _clone  s    c         C   s_   t  i | d t i ƒ} t t | i ƒ ƒ } t	 | | d | d d !ƒ } | i
 ƒ  } | Sd  S(   Ns   typei   i    (   s   _ncs   arrays   indicess   _nts	   MaybeLongs   ranges   lens   _shapes   dts	   transposes   copy(   s   selfs   indicess   dt(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _fix_pt_indices  s
    c         K   sZ   t  | ƒ } t |  | ƒ \ } } |  i d | ƒ } |  i | ƒ } |  i	 | | ƒ | Sd  S(   Ns   shape(
   s   lists   indicess
   _takeShapes   selfs   impliedShapes   Ns   _clones   results   _fix_pt_indicess   _taker(   s   selfs   indicess   keywdss   impliedShapes   Ns   result(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _take  s    c         K   sz   t  | ƒ } t |  | ƒ \ } } t | |  i ƒ o |  i	 | ƒ } n t
 | | ƒ } |  i | ƒ } |  i | | ƒ d  S(   N(   s   lists   indicess
   _takeShapes   selfs   impliedShapes   Ns
   isinstances   valuess	   __class__s   factorys
   _broadcasts   _fix_pt_indicess   _putter(   s   selfs   indicess   valuess   keywdss   impliedShapes   N(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _put#  s    c         O   s   t  |  | | Ž Sd  S(   N(   s   takes   selfs   indicess   keywords(   s   selfs   indicess   keywords(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   take,  s    c         O   s   t  |  | | Ž Sd  S(   N(   s   puts   selfs   indicess   keywords(   s   selfs   indicess   keywords(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   put/  s    c         C   s   t  i |  ƒ Sd  S(   N(   s   ufuncs   nonzeros   self(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   nonzero2  s    c         G   sÊ  t  | | Œ } t | ƒ } | d j  o t d ƒ ‚ n |  i ƒ  } t	 |  i
 t i ƒ p t	 |  i
 t i ƒ oŒ |  i ƒ  o |  i ƒ  } n |  i ƒ  } t i | |  i ƒ |  _
 |  i |  _ d |  _ t | | ƒ } |  i ƒ  | i ƒ  | |  |  | *n |  i
 i | |  i ƒ | f |  _ |  i ƒ  |  _ | on | | j o] | } x8 | | | j o& |  d | !|  | | | +| | 7} qKW|  d | | !|  | | +qªn d |  (| |  _ |  i ƒ  |  _ |  Sd S(   sp    resize() shrinks/grows 'self' to new 'shape', possibly
        replacing the underlying buffer object.
        i    s*   Negative shape dims don't work with resizeN(   s   getShapes   shapes   argss   products   nlens
   ValueErrors   selfs	   nelementss   olens
   isinstances   _datas   _typess
   BufferTypes   memorys
   MemoryTypes   iscontiguouss   views   oselfs   copys
   new_memorys	   _itemsizes   _bytestrides   _byteoffsets   mins   blens   ravels   resizes   _shapes   _stridesFromShapes   _stridess   offset(   s   selfs   shapes   argss   blens   offsets   nlens   oselfs   olen(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   resize5  s@     ,	

  	c         C   s   t  |  | | ƒ Sd S(   sV   repeat() returns a new array with each element  'a[i]' repeated 'r[i]' times.
        N(   s   repeats   selfs   repeatss   axis(   s   selfs   repeatss   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   repeat`  s     c         C   s   |  i |  i ƒ  f ƒ d S(   sB   ravel(self) setshapes 'self' into an equivalent 1D array.
        N(   s   selfs   setshapes	   nelements(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   ravele  s     c         O   s'   t  i |  i i } | i | | Ž  Sd S(   s‡   factory(...) calls the array(...) factory function defined in the
        source module where the class of 'self' was defined.
        N(	   s   syss   moduless   selfs	   __class__s
   __module__s   modules   arrays   argss   keys(   s   selfs   argss   keyss   module(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   factoryj  s     c         C   s   |  i ƒ  Sd  S(   N(   s   selfs   copy(   s   selfs   type(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   astypeq  s    c         C   s|   d G|  i GHd G|  i GHd G|  i GHd G|  i GHd G|  i GHd G|  i GHd G|  i ƒ  GHd G|  i ƒ  GHd	 Gt	 |  i
 ƒ GHd
 S(   s1   info() prints out the key attributes of an array.s   class:s   shape:s   strides:s   byteoffset:s   bytestride:s	   itemsize:s   aligned:s   contiguous:s   data:N(   s   selfs	   __class__s   _shapes   _stridess   _byteoffsets   _bytestrides	   _itemsizes	   isaligneds   iscontiguouss   reprs   _data(   s   self(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   infot  s     (<   s   __name__s
   __module__s   __doc__s
   _PROTOTYPEs   Nones   syss	   byteorders   __init__s   __len__s   _universalIndexings   _simpleIndexings	   _fixSlices   _slicedIndexing0s   _slicedIndexings   _takers   _putters   _views   swapaxess   __getstate__s   __setstate__s   __nonzero__s   __copy__s   __deepcopy__s
   __reduce__s   __repr__s   __str__s   itemsizes
   is_c_arrays   _stridesFromShapes   _arrayIndexings   _isSlices
   _broadcasts   _dualbroadcasts	   _copyFroms   setshapes   getshapes   propertys   shapes   getranks   getflats   setflats   flats   copys   tostrings   tofiles   _tofileByBlockss	   transposes   _clones   _fix_pt_indicess   _takes   _puts   takes   puts   nonzeros   resizes   repeats   ravels   factorys   astypes   info(    (    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   NDArray¤   sn    !	)		0	'"					
													+										"		
									+		c         G   sP   t  i |  ƒ } | i ƒ  o | i ƒ  } n | i ƒ  } | i | | Œ | Sd S(   s|   Returns a reshaped *view* of array if possible, else a *copy*. 

    Call either as reshape(i,j,k) or reshape((i,j,k)).
    N(
   s   _ncs   asarrays   arrs   vs   iscontiguouss   views   copys   setshapes   shapes   args(   s   arrs   shapes   argss   v(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   reshape€  s     c         C   s)   t  i |  ƒ }  t |  |  i ƒ  f ƒ Sd S(   s)   Returns a *view* of array reshaped as 1D.N(   s   _ncs   asarrays   arrays   reshapes	   nelements(   s   array(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   ravel�  s     c         C   s   d  S(   N(    (   s
   datastring(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys
   fromstring’  s    c         C   s$   t  i |  ƒ }  |  i | ƒ |  Sd S(   sF   Returns a *copy* of array, replicated or truncated to match new shape.N(   s   _ncs   arrays   resizes   shape(   s   arrays   shape(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   resize”  s     c         C   s*   t  i |  ƒ i ƒ  } | i | ƒ | Sd S(   s*   Returns the transpose of a *view* of arrayN(   s   _ncs   asarrays   arrays   views   vs	   transposes   axes(   s   arrays   axess   v(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys	   transposeš  s     iÿÿÿÿc         C   s$   t  i |  ƒ }  |  i | ƒ |  Sd S(   s!   Returns a sorted *copy* of array.N(   s   _ncs   arrays   sorts   axis(   s   arrays   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   sort   s     c         C   s    t  i |  ƒ }  |  i | ƒ Sd S(   sX   Returns an array of indices which, if "taken" from 'array',
    would sort 'array'.
    N(   s   _ncs   asarrays   arrays   argsorts   axis(   s   arrays   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   argsort¦  s     c         C   s    t  i |  ƒ }  |  i | ƒ Sd S(   s_   Returns an array of the indices of the minumum elements of 'array'
    taken along 'axis'.
    N(   s   _ncs   asarrays   arrays   argmins   axis(   s   arrays   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   argmin­  s     c         C   s    t  i |  ƒ }  |  i | ƒ Sd S(   s_   Returns an array of the indices of the maximum elements of 'array'
    taken along 'axis'.
    N(   s   _ncs   asarrays   arrays   argmaxs   axis(   s   arrays   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   argmax´  s     c         C   s\   |  t j o |  Sn t i |  ƒ i ƒ  } y | i | | ƒ Wn t	 j
 o n X| Sd S(   s<   Returns a *view* of array with axis1 and axis2 interchanged.N(
   s   arrays   Nones   _ncs   asarrays   views   vs   swapaxess   axis1s   axis2s
   ValueError(   s   arrays   axis1s   axis2s   v(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   swapaxes»  s     c         C   s˜   | t j o
 | t j o. | t j o t i |  ƒ Sq” t d ƒ ‚ nM | t j p
 | t j o t d ƒ ‚ n t t i	 |  d ƒ | | f | ƒ Sd S(   sö   where() returns an array shaped like 'condition' with
    elements selected from 'x' or 'y' by the 1 or 0 value of each condition
    element, respectively.

    If neither 'x' nor 'y' is specified, where acts as a synonym for
    nonzero().
    s6   single parameter where() does not support output arrays   Invalid parameter listi    N(
   s   xs   Nones   ys   outs   ufuncs   nonzeros	   conditions
   ValueErrors   chooses	   not_equal(   s	   conditions   xs   ys   out(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   whereÆ  s     c         C   s@   t  i |  | ƒ d t  i |  | ƒ } t | |  | | f ƒ Sd S(   sœ   clip()  returns a new array with every entry in m that is less than m_min 
    replaced by m_min, and every entry greater than m_max replaced by m_max.
    i   N(   s   ufuncs   lesss   ms   m_mins   greaters   m_maxs   selectors   choose(   s   ms   m_mins   m_maxs   selector(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   clipØ  s     &c   	      C   s,  t  t i g  i } |  D] } | | i d ƒ q ~ ƒ } |  d i d } | f t
 | ƒ } y t i |  ƒ } Wn) t j
 o |  d i d | ƒ } n X|  d i d | d | ƒ } d } xb |  D]Z } | i d | j o t d ƒ ‚ n | | | | i d !i | ƒ | | i d 7} qÆ W| Sd S(   s\   _concat handles the simplest case of concatenating numarray along the
    zero-th axis.
    i    i   s   shapes   types4   _concat array shapes must match except 1st dimensionN(   s   reduces   operators   adds   appends   _[1]s   arrss   as   _shapes   combinedLengths   rShapes   tuples	   destShapes   ufuncs   _maxPopTypes   convTypes	   TypeErrors   _clones   dests	   __class__s   ixs
   ValueErrors	   _copyFrom(	   s   arrss   as   ixs   rShapes   dests	   destShapes   _[1]s   combinedLengths   convType(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _concatß  s"     : c      	   C   st   t  t i |  ƒ }  | d j o t |  ƒ SnD t t g  i } |  D] } | t | | d ƒ ƒ qA ~ ƒ | d ƒ Sd S(   sq   concatenate() joins the sequence of numarray 'arrs' in a into a single array
    along the specified 'axis'.
    i    N(
   s   maps   _ncs   asarrays   arrss   axiss   _concats   swapaxess   appends   _[1]s   m(   s   arrss   axiss   ms   _[1](    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   concatenateö  s
     (   s   chooses   _takes   takes   _puts   putc         C   s   t  | t i |  ƒ ƒ Sd S(   sp   compress selects members of array 'a' along 'axis' which correspond to
    non-zero members of 'condition'.
    N(   s   _takes   as   ufuncs   nonzeros	   condition(   s	   conditions   a(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys	   _compress	  s     c         C   sG   | d j o t |  | ƒ Sn& t t |  t | d | ƒ ƒ d | ƒ Sd  S(   Ni    (   s   axiss	   _compresss	   conditions   as   swapaxes(   s	   conditions   as   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   compress  s    c   	      C   sè   t  i | ƒ o | f t |  ƒ } n t i | d t i ƒ} t  i	 i
 | ƒ } | f |  i d } |  i d | d |  i ƒ } d } xW t t | ƒ ƒ D]C } | | } x& t | ƒ D] } |  | | | | <q¶ W| | 7} q™ W| Sd  S(   Ns   typei   s   shapei    (   s   ufuncs	   _isScalars   repeatss   lens   arrays   _ncs   asarrays   _nts	   MaybeLongs   adds   reduces   totals   _shapes   newshapes	   __class__s   _types   newarrays   newis   ranges   is   limits   j(	   s   arrays   repeatss   newshapes   totals   is   js   newis   limits   newarray(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _repeat  s     
 c         C   sP   | d j o t t i |  ƒ | ƒ Sn& t t t |  d | ƒ | ƒ d | ƒ Sd S(   sR   repeat() returns a new array with each element  'a[i]' repeated 'r[i]' times.
    i    N(   s   axiss   _repeats   _ncs   asarrays   arrays   repeatss   swapaxes(   s   arrays   repeatss   axis(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   repeat%  s     c         C   sl   t  |  ƒ }  t t i t i |  ƒ ƒ ƒ } | i t	 |  ƒ f |  ƒ | t j	 o | i | ƒ } n | Sd S(   s|   indices(shape, type=None) returns an array representing a grid
    of indices with row-only, and column-only variation.
    N(   s   tuples   shapes   concatenates   ufuncs   nonzeros   _ncs   oness   as   setshapes   lens   types   Nones   astype(   s   shapes   types   a(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   indices-  s     c         C   s   t  |  t t | ƒ ƒ ƒ Sd S(   s  fromfunction() returns an array constructed by calling function
    on a tuple of number grids.  The function should accept as many
    arguments as there are dimensions which is a list of numbers
    indicating the length of the desired output for each axis.
    N(   s   applys   functions   tuples   indicess
   dimensions(   s   functions
   dimensions(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   fromfunction8  s     c         C   sY   y |  i | ƒ } Wn; t j
 o/ t | |  i ƒ  ƒ } | i |  i ƒ  ƒ n X| Sd  S(   N(	   s   as
   _broadcasts   bs   rs
   ValueErrors   resizes	   nelementss   setshapes   getshape(   s   as   bs   r(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   _broadcast_or_resize@  s    c         C   s†   t  i | ƒ } t  i | ƒ } | i ƒ  |  i ƒ  j o | i |  i	 ƒ  ƒ n t
 |  | ƒ } t
 |  | ƒ } t | |  | f |  ƒ d S(   s�   putmask() sets elements of 'array' for which 'mask' is non-zero to
    the corresponding element in 'values'.  'array' must be an array.
    N(   s   _ncs   asarrays   masks   bmasks   valuess   bvaluess	   nelementss   arrays   setshapes   getshapes   _broadcast_or_resizes   choose(   s   arrays   masks   valuess   bvaluess   bmask(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   putmaskH  s     (E   s   __doc__s   typess   _typess   maths   _maths   operators   numerictypess   _nts   syss   _bytess   memorys
   numincludes   copys   copy_regs   _ndarrays   _isIntegerSequences   products
   _alignments   _ufuncs
   _PROTOTYPEs   _buffer_reduces   pickles
   MemoryTypes   memory_from_strings   Nones   NewAxiss   _IOBLOCKSIZEs   _products   getShapes
   _broadcasts   _forwardBroadcasts   _nWayBroadcasts
   _takeShapes   infos   SuitableBuffers   ClassicUnpicklers   __safe_for_unpickling__s   NDArrays   reshapes   ravels
   fromstrings   resizes	   transposes   sorts   argsorts   argmins   argmaxs   swapaxess   wheres   clips   _concats   concatenates   numarraycores   _ncs   ufuncs   chooses   _takes   takes   _puts   puts
   arrayprints	   _compresss   compresss   _repeats   repeats   indicess   fromfunctions   _broadcast_or_resizes   putmask(;   s   _concats   infos   copy_regs
   numincludes   argmaxs   products	   _compresss   _takes   _maths   _bytess   _broadcast_or_resizes   operators
   _alignments   _isIntegerSequences   clips   _buffer_reduces   reshapes   compresss   concatenates   _nts   putmasks   fromfunctions   ClassicUnpicklers   chooses   NewAxiss   memorys   _ncs   ufuncs   SuitableBuffers   ravels
   _broadcasts   takes   sorts
   _PROTOTYPEs   repeats   _forwardBroadcasts	   transposes   _ufuncs   syss
   _takeShapes   puts   _IOBLOCKSIZEs
   arrayprints   copys   resizes   _nWayBroadcasts   _typess   _ndarrays   _puts   argmins
   fromstrings   argsorts   _repeats   getShapes   _products   NDArrays   indicess   swapaxess   where(    (    sI   /mit/python/arch/i386_rh9/lib/python2.3/site-packages/numarray/generic.pys   ?   sx   												

											ÿ ÿ Þ									%					