| 查看: 964 | 回复: 1 | ||
小木虫于金虫 (正式写手)
|
[求助]
f2py wrap fortran 2003 to python interface
|
|
一直用f2py把fortran的程序转换成python的接口,但是最近碰到一个问题。 在用fortran2003 编写面向对象的程序时,f2py无法识别Class关键字,因为在type链接的subroutine或者function中,class()声明的变量同样是intent(in)的. f2py编译出错。 用gfortran编译的错误如下: vars2fortran: No typespec for argument "self". 用ifort编译错误信息如下: ifort:f90: /tmp/tmp7e1233i1/src.linux-x86_64-3.5/x-f2pywrappers2.f90 /tmp/tmp7e1233i1/src.linux-x86_64-3.5/x-f2pywrappers2.f90(10): error #6633: The type of the actual argument differs from the type of the dummy argument. [SELF] kk2f2pywrap = kk2(self, q) ------------------------^ compilation aborted for /tmp/tmp7e1233i1/src.linux-x86_64-3.5/x-f2pywrappers2.f90 (code 1) /tmp/tmp7e1233i1/src.linux-x86_64-3.5/x-f2pywrappers2.f90(10): error #6633: The type of the actual argument differs from the type of the dummy argument. [SELF] kk2f2pywrap = kk2(self, q) ------------------------^ 最后不得不吧写好的oop的代码,重新改写。 求可以直接封装编译面向对象的fortran成python的方法。 |
» 猜你喜欢
售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急
已经有4人回复
售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急
已经有6人回复
fileCode有新解读?
已经有16人回复
售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急
已经有5人回复
售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急
已经有4人回复
售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急
已经有4人回复
售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急
已经有3人回复
基金中了
已经有14人回复
关于filecode
已经有7人回复
娱乐
已经有6人回复
weilai00
新虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 1659.4
- 散金: 34
- 红花: 10
- 帖子: 205
- 在线: 54.9小时
- 虫号: 4592281
- 注册: 2016-04-16
- 专业: 固体力学
2楼2018-08-10 18:35:22










回复此楼
100