__init__.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:psst 作者: power-system-simulation-toolbox 项目源码 文件源码
def _draw_nodes(self, nodelist, **kwargs):
        node_color = kwargs.get('node_color', 'r')
        if isinstance(node_color, dict):
            node_color = [node_color[n] for n in nodelist]
            kwargs['node_color'] = node_color
        labels = kwargs.get('labels', {k: k for k in nodelist})
        if labels is not False:
            self._draw_node_labels(labels)
        return nx.draw_networkx_nodes(self._G, self._pos, nodelist=nodelist, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号