#NEWLINE# def reduce( self , dimensions = None , function = None , **reduce_map ) : #NEWLINE# #INDENT# '\n        Reduce each Element in the HoloMap using a function supplied\n        via the kwargs, where the keyword has to match a particular\n        dimension in the Elements.\n        ' #NEWLINE# from .. element import Table #NEWLINE# reduced_items = [ ( k , v . reduce ( dimensions , function , ** reduce_map ) ) for ( k , v ) in self . items ( ) ] #NEWLINE# if ( not isinstance ( reduced_items [ 0 ] [ 1 ] , Table ) ) : #NEWLINE# #INDENT# params = dict ( util . get_param_values ( self . last ) , kdims = self . kdims , vdims = self . last . vdims ) #NEWLINE# return Table ( reduced_items , ** params ) #NEWLINE# #UNINDENT# return self . clone ( reduced_items ) . table ( )