#NEWLINE# def _add_item( self , key , value , sort = True , update = True ) : #NEWLINE# #INDENT# if np . isscalar ( value ) : #NEWLINE# #INDENT# value = ( value , ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isinstance ( value , NdElement ) ) : #NEWLINE# #INDENT# value = tuple ( value ) #NEWLINE# #UNINDENT# #UNINDENT# if ( ( len ( value ) != len ( self . vdims ) ) and ( not isinstance ( value , NdElement ) ) ) : #NEWLINE# #INDENT# raise ValueError ( ( '%s values must match value dimensions' % type ( self ) . __name__ ) ) #NEWLINE# #UNINDENT# super ( NdElement , self ) . _add_item ( key , value , sort , update )