gpt4 book ai didi

python - FiPy 不工作

转载 作者:太空宇宙 更新时间:2023-11-04 05:52:31 25 4
gpt4 key购买 nike

在 Mac(OS X 10.10.2 和 Python 2.7.6)上全新安装 FiPy 后,我尝试了文档中的一些示例,但它们没有用。因此,我使用内置测试例程(从 python shell 键入“fipy.test()”)测试了 FiPy,但在一长串好的 doctests 之后,我得到了这个日志,有两个失败: https://gist.github.com/alfrenardi/3b1ad5ff814077b18882

我也尝试过全新的 LTS Ubuntu 安装,但我遇到了同样的问题。有什么解决方法吗?在我看来,这看起来像是 FiPy 模块的问题,而不是平台的问题。

最佳答案

两个失败的测试

print type(numerix.array([1.0, 2.0]) * PhysicalField([1.0, 2.0])) is type(numerix.array(1))

C = CellVariable(mesh=mesh) * (A * B)

是不太可能干扰大多数 FiPy 用例的边缘情况。警告如

Skipped 105 doctest examples because `gmsh` cannot be found on the $PATH

仅当您计划使用这些库提供的某些功能时才重要。

作为安装的非常基本的测试(在测试套件之上和之外),尝试运行 1D diffusion example 中概述的 1D 扩散问题。并检查屏幕上是否绘制了一些合理的内容。

关于python - FiPy 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29429581/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com