I ran into this problem several times by now: I save some kind of information I need in a class that holds a tuple of data, since the two are connected (e.g. a channel number for my Zotino board and some internal list index with the voltage corresponding to that channel). Outside of the kernel this is no issue, but as soon as I want to access a tuple member in a kernel function, I get the error
<repository>\tests.py:31:15-31:28: error: type (numpy.int32, numpy.int32) is not iterable
As an example if I uncomment the last line here, the experiment will not compile:
self.my_tuple = (1, 2)
Interestingly (at least to me), the tuple itself poses no issue, just accessing its members. Why is it designed this way? Accessing list members is no problem, as long as the list has a fixed size and I think these two data types are closely related. Of course it is always possible to rewrite the tuple as a list with two elements, but I think it is a nice and natural language construct for a small amount of closely connected variables.