Current File : //usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyc
�
E�`Qc@slddlZddlmZdZdZeege�Zd�Zd�Z	d�Z
d�Zd	�ZdS(
i����N(tTestCaseii
cCs�|dkrtdgSg}xhdD]`}xWdD]O}td|||d}||||}|jt||||��q1Wq$W|S(sGReturns slices of length nelems, from start onwards, in direction sign.iiii����(ii(i����i(tsizetappendtslice(tnelemstreststeptsigntstarttstop((sQ/usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyt_indices_for_nelems	s

%cCsZg}xMdD]E}t|�}|jg|D]}|D]}||f^q6q,�q
W|S(s$Returns (src, dst) pairs of indices.iii(iii(R
textend(RRtindtatb((sQ/usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyt_indices_for_axiss

7cCsot�}gg}xVt|�D]H}g}x3|D]+}x"|D]}|j|g|�q?Wq2W|}qW|S(sKReturns ((axis0_src, axis0_dst), (axis1_src, axis1_dst), ... ) index pairs.(RtxrangeR(tndimsRRtitnewrestelemtothers((sQ/usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyt_indices&s		


cCsxtjtjt��jt�}|j�}||||<||||<tj||k�sttd||f��dS(s1Check assignment arr[dstidx] = arr[srcidx] works.sassigning arr[%s] = arr[%s]N(tnptarangetproducttshapetreshapetcopytalltAssertionError(tsrcidxtdstidxtarrtcpy((sQ/usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyt_check_assignment8s
!ccsutt�}xb|D]Z}tg|D]}|d^q#�}tg|D]}|d^qF�}t||fVqWdS(sATest automatically generated assignments which overlap in memory.iiN(RRttupleR#(tindsRR
RR ((sQ/usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyttest_overlapping_assignmentsEs

##(
tnumpyRt
numpy.testingRRRR$RR
RRR#R&(((sQ/usr/lib64/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.pyt<module>s