class Foo
{
public:
double * get_vec()
{
return vec;
}
protected:
double vec[3];
};
from input.py
myvar = fooInstance.get_vec()
print(myvar)
print(myvar[0]) -- works
print(myvar[1]) -- doesn't work, fails with IndexError: Index out of range in swig_ref::__getitem__ error
i think the issue is due to the sole use of get_truncated_size. this seems to return the size relative to its containing class which will always result in a size of 1.