graph - Manim Community v0.5.0的Graph类有问题吗?
问题描述
我在 Pycharm 中使用最新版本的 Manim Community
这段代码
class MovingVertices(Scene):
def construct(self):
vertices = [1, 2, 3, 4]
edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]
g = Graph(vertices, edges)
给出这个错误:
TypeError: __init__() takes 1 positional argument but 3 were given
我正在努力理解这个错误。其他示例给出了相同的错误。
解决方案
解决方案:我创建了一个名为 graph.py 的新文件并导出了里面的所有代码示例。也许其他 py 文件产生了我无法解释的冲突。
推荐阅读
- javascript - 在向服务器发送任何其他请求之前加载某些图像
- django - Django 模型 - 反向外键
- angular - Angular:表单、子组件、主题订阅和事件排序问题
- flutter - Provider 和 ChangeNotifierProvider 的区别
- cluster-analysis - 根据多个字符串相似度评级对字符串进行聚类
- r - 为什么在 R 中使用 SMOTE 时会出现“T[, col] <- data[, col] 中的错误”?
- python - 第 18 章:Python 自动 GUI
- android - 警报对话框不会显示在我的 onSwipe 方法中
- angular - 角度引导日期选择器不调用函数
- javascript - Laravel 6 带删除的多文件预览