#NEWLINE# def __init__( self , initial_items = None , **params ) : #NEWLINE# #INDENT# if isinstance ( initial_items , NdMapping ) : #NEWLINE# #INDENT# map_type = type ( initial_items ) #NEWLINE# own_params = self . params ( ) #NEWLINE# new_params = dict ( initial_items . get_param_values ( onlychanged = True ) ) #NEWLINE# if ( new_params . get ( 'group' ) == map_type . __name__ ) : #NEWLINE# #INDENT# new_params . pop ( 'group' ) #NEWLINE# #UNINDENT# params = dict ( { name : value for ( name , value ) in new_params . items ( ) if ( name in own_params ) } , ** params ) #NEWLINE# #UNINDENT# super ( MultiDimensionalMapping , self ) . __init__ ( OrderedDict ( ) , ** value ) #NEWLINE# self . _next_ind = 0 #NEWLINE# self . _check_key_type = True #NEWLINE# self . _cached_index_types = [ d . type for d in self . kdims ] #NEWLINE# self . _cached_index_values = { d . name : d . values for d in self . kdims } #NEWLINE# self . _cached_categorical = any ( ( d . values for d in self . kdims ) ) #NEWLINE# self . _instantiated = ( not any ( ( ( v == 'initial' ) for v in self . _cached_index_values . values ( ) ) ) ) #NEWLINE# if ( initial_items is None ) : #NEWLINE# #INDENT# initial_items = [ ] #NEWLINE# #UNINDENT# if isinstance ( initial_items , tuple ) : #NEWLINE# #INDENT# self . _add_item ( initial_items [ 0 ] , initial_items [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( not self . _check_items ) and self . _instantiated ) : #NEWLINE# #INDENT# if isinstance ( initial_items , dict ) : #NEWLINE# #INDENT# initial_items = initial_items . items ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( initial_items , MultiDimensionalMapping ) : #NEWLINE# #INDENT# initial_items = initial_items . data . items ( ) #NEWLINE# #UNINDENT# #UNINDENT# self . data = OrderedDict ( ( ( ( k if isinstance ( k , tuple ) else ( k , ) ) , v ) for ( k , v ) in initial_items ) ) #NEWLINE# self . _resort ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( initial_items is not None ) : #NEWLINE# #INDENT# self . update ( OrderedDict ( initial_items ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . _instantiated = True