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