嗨,我正在用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上用水蟒。有人能帮忙吗?在
课程代码似乎不支持最新版本的SymPy,它对API进行了更改(},就像{})一样。您可以通过编辑
zeros()
现在的工作方式类似于zeros(r, c)
,而不是{/Users/user/Desktop/Course/Python/ipython/notebooks-master/generate_problems.py
中的代码来修复它。在相关问题 更多 >
编程相关推荐