ipython noteb中的“TypeError:note all parameters during string formatting”中的“TypeError:note all arguments during string formatting”

2024-09-30 22:17:40 发布

您现在位置:Python中文网/ 问答频道 /正文

嗨,我正在用python学习线性代数和Edx课程。(http://nbviewer.ipython.org/github/ULAFF/notebooks/tree/may-14-2014/)。在

在“02.4.2.10矩阵向量乘法练习”的第一个框中,代码为:

import generate_problems as gp
print("What is the result of the matrix vector product below?")

p = gp.Problem()

p.new_problem()
generate_problems is a module that the professor at Edx created. However, I got an error importing sympy.

当我试图执行上面的代码时,我得到了下面的错误:

^{pr2}$

我似乎太少了%s兼容性.py?我在Mac OSX Yosemite上用水蟒。有人能帮忙吗?在


Tags: the代码orggithubhttpisipythongenerate
1条回答
网友
1楼 · 发布于 2024-09-30 22:17:40

课程代码似乎不支持最新版本的SymPy,它对API进行了更改(zeros()现在的工作方式类似于zeros(r, c),而不是{},就像{})一样。您可以通过编辑/Users/user/Desktop/Course/Python/ipython/notebooks-master/generate_problems.py中的代码来修复它。在

相关问题 更多 >