我在header.h内部定义了一个看起来像:
的结构typedef struct {
....
int icntl[40];
double cntl[15];
int *irn, *jcn;
....
当我使用这种结构初始化对象时,我可以访问整数/双精度值,但不能访问数组。
>> st.icntl
<Swig Object of type 'int *' at 0x103ce37e0>
>> st.icntl[0]
Traceback (most recent call last):
File "test_mumps.py", line 19, in <module>
print s.icntl[0]
TypeError: 'SwigPyObject' object is not subscriptable
如何访问读/写中的值?