Return an axes dictionary for myself.
14624
def _construct_axes_dict_for_slice(self, axes=None, **kwargs):
        """"""
        d = {self._AXIS_SLICEMAP[a]: self._get_axis(a)
             for a in (axes or self._AXIS_ORDERS)}
        d.update(kwargs)
        return d
1263994
def from_axes(cls,axes):
        
        ax = list(axes)
        #ax[-1] *= -1  # Not sure what is going on here...
        arr = N.diag(ax + [-1])
        return arr.view(cls)
1371202
def _get_plane_axes(self, axis):
        
        return [self._get_axis(axi)
                for axi in self._get_plane_axes_index(axis)]
404335
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'collections') and self.collections is not None:
            _dict['collections'] = [x._to_dict() for x in self.collections]
        return _dict
368284
def axis(self):
        """"""
        return getattr(
            self.colorbar.ax, self.axis_locations[self.position] + 'axis')
1294438
def to_dict(self, get_value=None):
        """"""
        self.trim()
        result = {}
        for key, value in iteritems(self.counters):
            if get_value is not None:
                value = getattr(value, get_value)
            r = result
            for _key in key[:-1]:
                r = r.setdefault(_key, {})
            r[key[-1]] = value
        return result
271343
def _get_axis(self, array, axis, slice_num,
                  extended=False,
                  transpose=True):
        """"""

        slice_list = [slice(None)] * array.ndim
        slice_list[axis] = slice_num
        slice_data = array[tuple(slice_list)]
        if transpose:  # for proper orientation
            slice_data = slice_data.T

        if not extended:
            # return just the slice data
            return slice_data
        else:
            # additionally include which dim and which slice num
            return axis, slice_num, slice_data
790014
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'step') and self.step is not None:
            _dict['step'] = self.step
        if hasattr(self, 'snapshot') and self.snapshot is not None:
            _dict['snapshot'] = self.snapshot
        return _dict
71906
def get_axes(self, idx):
        
        cidx = 0
        if idx > 0:
            cidx = idx % self.ncols
        ridx = idx / self.ncols
        return self.axarr[ridx][cidx]
635034
def to_dict(self, **kw):
        
        """
        _, value = helpers.etree_to_dict(self._xml, **kw).popitem()
        return value
1184362
def dict(self):
        """"""
        return {
            'raw': self.raw,
            'start_index': self.start_index,
            'end_index': self.end_index,
            'stripped': self.stripped,
            'noun_phrases': self.noun_phrases,
            'polarity': self.polarity,
            'subjectivity': self.subjectivity,
        }
353736
def to_dict(self):
        """"""
        dictionary = {}
        for key, value in iteritems(self.__dict__):
            property_name = key[1:]
            if hasattr(self, property_name):
                dictionary.update({property_name: getattr(self, property_name, None)})
        return dictionary
238925
def dict_to_nx(graph, oriented=False):
    """"""
    nxg = nx.DiGraph() if oriented else nx.Graph()
    for node, succs in graph.items():
        for succ in succs:
            nxg.add_edge(node, succ)
    return nxg
269261
def _mpl_ax_to(self, mplobj, output='vb'):
        """"""
        for ax in self._axs.values():
            if ax['ax'] is mplobj.axes:
                return ax[output]
        raise RuntimeError('Parent axes could not be found!')
593990
def to_dict(self, data=True):
        """"""
        item = {'dims': self.dims,
                'attrs': decode_numpy_dict_values(self.attrs)}
        if data:
            item['data'] = ensure_us_time_resolution(self.values).tolist()
        else:
            item.update({'dtype': str(self.dtype), 'shape': self.shape})
        return item
477805
def maybe_get_ax(*args, **kwargs):
    

    if 'ax' in kwargs:
        ax = kwargs.pop('ax')
    elif len(args) == 0:
        fig = plt.gcf()
        ax = plt.gca()
    elif isinstance(args[0], mpl.axes.Axes):
        ax = args[0]
        args = args[1:]
    else:
        ax = plt.gca()
    return ax, args, dict(kwargs)
953428
def to_dict(self):
        """"""
        return {
            'high': self.high,
            'low': self.low,
            'mean': self.mean,
            'count': self.count,
            'deviation': self.deviation,
        }