ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c@`sdZddlmZmZmZddlZddlmZgZ dZ dZ dZ dZ d Zd Zd efd YZdS( sEMixin classes for custom array types that don't inherit from ndarray.i(tdivisiontabsolute_importtprint_functionN(tumathcC`s*y|jdkSWntk r%tSXdS(s)True when __array_ufunc__ is set to None.N(t__array_ufunc__tNonetAttributeErrortFalse(tobj((sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyt_disables_array_ufunc s c`s%fd}dj||_|S(s>Implement a forward binary method with a ufunc, e.g., __add__.c`st|rtS||S(N(R tNotImplemented(tselftother(tufunc(sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pytfuncs s__{}__(tformatt__name__(R tnameR((R sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyt_binary_methodsc`s%fd}dj||_|S(sAImplement a reflected binary method with a ufunc, e.g., __radd__.c`st|rtS||S(N(R R (R R (R (sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyR s s__r{}__(RR(R RR((R sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyt_reflected_binary_methodsc`s%fd}dj||_|S(sAImplement an in-place binary method with a ufunc, e.g., __iadd__.c`s||d|fS(Ntout((R R (R (sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyR*ss__i{}__(RR(R RR((R sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyt_inplace_binary_method(scC`s(t||t||t||fS(sEImplement forward, reflected and inplace binary methods with a ufunc.(RRR(R R((sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyt_numeric_methods0s  c`s%fd}dj||_|S(s.Implement a unary special method with a ufunc.c`s |S(N((R (R (sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyR9ss__{}__(RR(R RR((R sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyt _unary_method7stNDArrayOperatorsMixincB`sZeZdZeejdZeejdZeej dZ eej dZ eej dZeejdZeejd\ZZZeejd\ZZZeejd \ZZZejj d kreej!d \Z"Z#Z$neej%d \Z&Z'Z(eej)d \Z*Z+Z,eej-d\Z.Z/Z0eej1dZ2e3ej1dZ4eej5d\Z6Z7Z8eej9d\Z:Z;Z<eej=d\Z>Z?Z@eejAd\ZBZCZDeejEd\ZFZGZHeejId\ZJZKZLeMejNdZOeMejPdZQeMejRdZSeMejTdZURS(sw Mixin defining all operator special methods using __array_ufunc__. This class implements the special methods for almost all of Python's builtin operators defined in the `operator` module, including comparisons (``==``, ``>``, etc.) and arithmetic (``+``, ``*``, ``-``, etc.), by deferring to the ``__array_ufunc__`` method, which subclasses must implement. This class does not yet implement the special operators corresponding to ``matmul`` (``@``), because ``np.matmul`` is not yet a NumPy ufunc. It is useful for writing classes that do not inherit from `numpy.ndarray`, but that should support arithmetic and numpy universal functions like arrays as described in :ref:`A Mechanism for Overriding Ufuncs `. As an trivial example, consider this implementation of an ``ArrayLike`` class that simply wraps a NumPy array and ensures that the result of any arithmetic operation is also an ``ArrayLike`` object:: class ArrayLike(np.lib.mixins.NDArrayOperatorsMixin): def __init__(self, value): self.value = np.asarray(value) # One might also consider adding the built-in list type to this # list, to support operations like np.add(array_like, list) _HANDLED_TYPES = (np.ndarray, numbers.Number) def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): out = kwargs.get('out', ()) for x in inputs + out: # Only support operations with instances of _HANDLED_TYPES. # Use ArrayLike instead of type(self) for isinstance to # allow subclasses that don't override __array_ufunc__ to # handle ArrayLike objects. if not isinstance(x, self._HANDLED_TYPES + (ArrayLike,)): return NotImplemented # Defer to the implementation of the ufunc on unwrapped values. inputs = tuple(x.value if isinstance(x, ArrayLike) else x for x in inputs) if out: kwargs['out'] = tuple( x.value if isinstance(x, ArrayLike) else x for x in out) result = getattr(ufunc, method)(*inputs, **kwargs) if type(result) is tuple: # multiple return values return tuple(type(self)(x) for x in result) elif method == 'at': # no return value return None else: # one return value return type(self)(result) def __repr__(self): return '%s(%r)' % (type(self).__name__, self.value) In interactions between ``ArrayLike`` objects and numbers or numpy arrays, the result is always another ``ArrayLike``: >>> x = ArrayLike([1, 2, 3]) >>> x - 1 ArrayLike(array([0, 1, 2])) >>> 1 - x ArrayLike(array([ 0, -1, -2])) >>> np.arange(3) - x ArrayLike(array([-1, -1, -1])) >>> x - np.arange(3) ArrayLike(array([1, 1, 1])) Note that unlike ``numpy.ndarray``, ``ArrayLike`` does not allow operations with arbitrary, unrecognized types. This ensures that interactions with ArrayLike preserve a well-defined casting hierarchy. tlttleteqtnetgttgetaddtsubtmulitdivttruedivtfloordivtmodtdivmodtpowtlshifttrshifttandtxortortnegtpostabstinvert(VRt __module__t__doc__Rtumtlesst__lt__t less_equalt__le__tequalt__eq__t not_equalt__ne__tgreatert__gt__t greater_equalt__ge__RRt__add__t__radd__t__iadd__tsubtractt__sub__t__rsub__t__isub__tmultiplyt__mul__t__rmul__t__imul__tsyst version_infotmajortdividet__div__t__rdiv__t__idiv__t true_dividet __truediv__t __rtruediv__t __itruediv__t floor_dividet __floordiv__t __rfloordiv__t __ifloordiv__t remaindert__mod__t__rmod__t__imod__R&t __divmod__Rt __rdivmod__tpowert__pow__t__rpow__t__ipow__t left_shiftt __lshift__t __rlshift__t __ilshift__t right_shiftt __rshift__t __rrshift__t __irshift__t bitwise_andt__and__t__rand__t__iand__t bitwise_xort__xor__t__rxor__t__ixor__t bitwise_ort__or__t__ror__t__ior__Rtnegativet__neg__tpositivet__pos__tabsolutet__abs__R0t __invert__(((sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyR?s>M(R2t __future__RRRRKt numpy.coreRR3t__all__R RRRRRtobjectR(((sC/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/mixins.pyts