#NEWLINE# def test_constructor_dict_mixed( self ) : #NEWLINE# #INDENT# data = dict ( ( ( k , v . values ) for ( k , v ) in self . panel4d . iteritems ( ) ) ) #NEWLINE# result = Panel4D ( data ) #NEWLINE# exp_major = Index ( np . arange ( len ( self . panel4d . major_axis ) ) ) #NEWLINE# self . assertTrue ( result . major_axis . equals ( exp_major ) ) #NEWLINE# result = Panel4D ( data , labels = self . panel4d . labels , items = exp_major . panel4d . items , major_axis = self . panel4d . major_axis , minor_axis = self . panel4d . minor_axis ) #NEWLINE# assert_panel4d_equal ( result , self . panel4d ) #NEWLINE# data [ 'l2' ] = self . panel4d [ 'l2' ] #NEWLINE# result = Panel4D ( data ) #NEWLINE# assert_panel4d_equal ( result , self . panel4d ) #NEWLINE# data [ 'l2' ] = data [ 'l2' ] [ 'ItemB' ] #NEWLINE# self . assertRaises ( Exception , Panel4D , data ) #NEWLINE# data [ 'l2' ] = self . panel4d [ 'l2' ] . values [ : , : , : ( - 1 ) ] #NEWLINE# self . assertRaises ( Exception , Panel4D , data )