#NEWLINE# def test_slice0_2d( self ) : #NEWLINE# #INDENT# nparr = np . empty ( ( 4 , 5 ) ) #NEWLINE# arr = Array . from_desc ( 0 , nparr . shape , nparr . strides , nparr . dtype . itemsize ) #NEWLINE# xx = ( ( - 2 ) , 0 , 1 , 2 ) #NEWLINE# for x in xx : #NEWLINE# #INDENT# expect = nparr [ x : ] #NEWLINE# got = arr [ x : ] #NEWLINE# self . assertSameContig ( got , expect ) #NEWLINE# self . assertEqual ( got . shape , expect . shape ) #NEWLINE# self . assertEqual ( got . strides , expect . strides ) #NEWLINE# #UNINDENT# for ( x , y ) in itertools . product ( xx , xx ) : #NEWLINE# #INDENT# expect = nparr [ x : , y : ] #NEWLINE# got = arr [ x : , y : ] #NEWLINE# self . assertSameContig ( got , expect ) #NEWLINE# self . assertEqual ( got . shape , expect . shape ) #NEWLINE# self . assertEqual ( got . strides , expect . strides )