#NEWLINE# def test_reshape_non_2d( self ) : #NEWLINE# #INDENT# x = Series ( np . random . random ( 201 ) , name = 'x' ) #NEWLINE# self . assertTrue ( ( x . reshape ( x . shape ) is x ) ) #NEWLINE# a = Series ( [ 1 , 2 , 3 , 4 ] ) #NEWLINE# result = a . reshape ( 2 , 2 ) #NEWLINE# expected = a . values . reshape ( 2 , 2 ) #NEWLINE# tm . assert_numpy_array_equal ( result , expected ) #NEWLINE# self . assertTrue ( ( type ( result ) is type ( x ) ) )