def _process(self, p, element, ranges={}):
        # Creates a unified Dataset.data attribute
        # to draw the data from
        if isinstance(element.data, np.ndarray):
            if 'dataframe' in Dataset.datatype:
                el_data = element.table('dataframe')
            else:
                el_data = element.table('ndelement')
        el_data = element.data

        # Get dimensions to plot against each other
        dims = [d for d in element.dimensions()
                if _is_number(element.range(d)[0])]
        permuted_dims = [(d1, d2) for d1 in dims
                         for d2 in dims[::-1]]

        data = {}
        for d1, d2 in permuted_dims:
            if d1 == d2:
                if p.diagonal_type is Histogram:
                    bin_range = ranges.get(d1.name, element.range(d1))
                    el = element.hist(dimension=d1.name,
                                      bin_range=bin_range,
                                      adjoin=False)
                else:
                    values = element.dimension_values(d1)
                    el = p.diagonal_type(values, kdims=[d1])
            else:
                el = p.chart_type(el_data, kdims=[d1],
                                  vdims=[d2])
            data[(d1.name, d2.name)] = el
        return data
dataset/ETHPy150Open ioam/holoviews/holoviews/operation/element.py/gridmatrix._process/original