Ñò \ÐKc@sMdZddkZdgZdefd„ƒYZddd„Zd„ZdS(s¢ Utilities that manipulate strides to achieve desirable effects. An explanation of strides can be found in the "ndarray.rst" file in the NumPy reference guide. iÿÿÿÿNtbroadcast_arrayst DummyArraycBseZdZdd„ZRS(s… Dummy object that just exists to hang __array_interface__ dictionaries and possibly keep alive a reference to a base array. cCs||_||_dS(N(t__array_interface__tbase(tselft interfaceR((s=/usr/lib64/python2.6/site-packages/numpy/lib/stride_tricks.pyt__init__s N(t__name__t __module__t__doc__tNoneR(((s=/usr/lib64/python2.6/site-packages/numpy/lib/stride_tricks.pyR scCsjt|iƒ}|dj ot|ƒ|d>> x = np.array([[1,2,3]]) >>> y = np.array([[1],[2],[3]]) >>> np.broadcast_arrays(x, y) [array([[1, 2, 3], [1, 2, 3], [1, 2, 3]]), array([[1, 1, 1], [2, 2, 2], [3, 3, 3]])] Here is a useful idiom for getting contiguous copies instead of non-contiguous views. >>> map(np.array, np.broadcast_arrays(x, y)) [array([[1, 2, 3], [1, 2, 3], [1, 2, 3]]), array([[1, 1, 1], [2, 2, 2], [3, 3, 3]])] iiisKshape mismatch: two or more arrays have incompatible dimensions on axis %r.R R (tmapRRR tlentsettlistR tmaxtranget ValueErrortremovetpoptappendtzipR(targst_[1]Rtshapest_[2]tst_[3]R t_[4]tndstbiggesttitdifft common_shapetaxist_[5]tlengthstuniquet new_lengtht_[6]tshtstt broadcasted((s=/usr/lib64/python2.6/site-packages/numpy/lib/stride_tricks.pyRsF'$'*'  ! %   A( R tnumpyRt__all__tobjectRR RR(((s=/usr/lib64/python2.6/site-packages/numpy/lib/stride_tricks.pyts