Re: [petsc-dev] Correct syntax for DMDA ownership ranges in petsc4py
8 Apr
2016
8 Apr
'16
3:01 a.m.
On 8 Apr 2016, at 08:29, Chris Eldred <[email protected]> wrote:
Yes I have tried all possible variants: [(8,8,4),] ([8,8,4],) [[8,8,4],] ((8,8,4),) and they all fail with the same TypeError: Expected tuple, got list
However, I think I see what is happening now. In line 156 cdef object ranges = list(ownership_ranges) it looks like ranges is being defined as a list, rather than a tuple. So maybe there should be a cast from list to tuple in the return statement?
That looks right, since the return type of asOwnerShipRanges is declared as tuple, but as you note, the return variable has type list. Lawrence
3777
Age (days ago)
3777
Last active (days ago)
0 comments
1 participants
participants (1)
-
Lawrence Mitchell